browser/modules/offlineAppCache.jsm
author Margaret Leibovic <margaret.leibovic@gmail.com>
Mon, 05 Jan 2015 16:29:08 -0800
changeset 235072 e9ef000ac1a6db6e97015564663189bf70baa108
parent 148125 0c91d9aa9476a9c2c6eb01e6142267d7987977e2
child 328755 aaf96b1be8a7912c1848292d5763c36aacf4f71f
permissions -rw-r--r--
Bug 1117841 - Remove "title bar" from display settings summary. r=mfinkle

/* 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/. */
 
this.EXPORTED_SYMBOLS = ["OfflineAppCacheHelper"];

Components.utils.import('resource://gre/modules/LoadContextInfo.jsm');

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

this.OfflineAppCacheHelper = {
  clear: function() {
    var cacheService = Cc["@mozilla.org/netwerk/cache-storage-service;1"].getService(Ci.nsICacheStorageService);
    var appCacheStorage = cacheService.appCacheStorage(LoadContextInfo.default, null);
    try {
      appCacheStorage.asyncEvictStorage(null);
    } catch(er) {}
  }
};