browser/modules/offlineAppCache.jsm
author Matt Woodrow <mwoodrow@mozilla.com>
Sat, 30 Jun 2012 15:06:13 +1200
changeset 98026 6e8c5c011767c7d7e5072dc27cb192750ce347c0
parent 94475 f4157e8c410708d76703f19e4dfb61859bfe32d8
child 107131 19d45bb5e12c29a280feaecc084557aada2b1ac0
permissions -rw-r--r--
Bug 539356 - Part 24 - Don't paint android widgets that aren't being composited, or at the front. r=roc

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
let EXPORTED_SYMBOLS = ["OfflineAppCacheHelper"];

const Cc = Components.classes;
const Ci = Components.interfaces;

let OfflineAppCacheHelper = {
  clear: function() {
    var cacheService = Cc["@mozilla.org/network/cache-service;1"].
                       getService(Ci.nsICacheService);
    try {
      cacheService.evictEntries(Ci.nsICache.STORE_OFFLINE);
    } catch(er) {}

    var storageManagerService = Cc["@mozilla.org/dom/storagemanager;1"].
                                getService(Ci.nsIDOMStorageManager);
    storageManagerService.clearOfflineApps();
  }
};