Bug 1054418 - Rewrite AppCacheUtils.jsm to use HTTP Cache v2 APIs r=michal

This commit is contained in:
Steve Workman
2014-08-19 13:59:57 -07:00
parent 62c6eb815c
commit 97cc508b84

View File

@@ -293,7 +293,14 @@ AppCacheUtils.prototype = {
},
clearAll: function ACU_clearAll() {
Services.cache.evictEntries(Ci.nsICache.STORE_OFFLINE);
if (!Services.prefs.getBoolPref("browser.cache.disk.enable")) {
throw new Error(l10n.GetStringFromName("cacheDisabled"));
}
let appCacheStorage = Services.cache2.appCacheStorage(LoadContextInfo.default, null);
appCacheStorage.asyncEvictStorage({
onCacheEntryDoomed: function(result) {}
});
},
_getManifestURI: function ACU__getManifestURI() {