mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1008620 - Clearing history should also clear jump list cache on Windows. r=bbondy
This commit is contained in:
parent
5e7f3a1714
commit
3a42e94274
@ -383,6 +383,7 @@ var gAdvancedPane = {
|
||||
cache.clear();
|
||||
} catch(ex) {}
|
||||
this.updateActualCacheSize();
|
||||
Services.obs.notifyObservers(null, "clear-private-data", null);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -395,6 +396,7 @@ var gAdvancedPane = {
|
||||
|
||||
this.updateActualAppCacheSize();
|
||||
this.updateOfflineApps();
|
||||
Services.obs.notifyObservers(null, "clear-private-data", null);
|
||||
},
|
||||
|
||||
readOfflineNotify: function()
|
||||
|
@ -560,6 +560,7 @@ var gPrivacyPane = {
|
||||
// reset the timeSpan pref
|
||||
if (aClearEverything)
|
||||
ts.value = timeSpanOrig;
|
||||
Services.obs.notifyObservers(null, "clear-private-data", null);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -43,6 +43,7 @@ const char kPrefTaskbarEnabled[] = "browser.taskbar.lists.enabled";
|
||||
|
||||
NS_IMPL_ISUPPORTS(JumpListBuilder, nsIJumpListBuilder, nsIObserver)
|
||||
#define TOPIC_PROFILE_BEFORE_CHANGE "profile-before-change"
|
||||
#define TOPIC_CLEAR_PRIVATE_DATA "clear-private-data"
|
||||
|
||||
JumpListBuilder::JumpListBuilder() :
|
||||
mMaxItems(0),
|
||||
@ -63,6 +64,7 @@ JumpListBuilder::JumpListBuilder() :
|
||||
do_GetService("@mozilla.org/observer-service;1");
|
||||
if (observerService) {
|
||||
observerService->AddObserver(this, TOPIC_PROFILE_BEFORE_CHANGE, false);
|
||||
observerService->AddObserver(this, TOPIC_CLEAR_PRIVATE_DATA, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -537,6 +539,11 @@ NS_IMETHODIMP JumpListBuilder::Observe(nsISupports* aSubject,
|
||||
new mozilla::widget::AsyncDeleteAllFaviconsFromDisk();
|
||||
mIOThread->Dispatch(event, NS_DISPATCH_NORMAL);
|
||||
}
|
||||
} else if (strcmp(aTopic, TOPIC_CLEAR_PRIVATE_DATA) == 0) {
|
||||
// Delete JumpListCache icons from Disk, if any.
|
||||
nsCOMPtr<nsIRunnable> event =
|
||||
new mozilla::widget::AsyncDeleteAllFaviconsFromDisk(false);
|
||||
mIOThread->Dispatch(event, NS_DISPATCH_NORMAL);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user