browser/modules/offlineAppCache.jsm
author tbirdbld
Fri, 13 Feb 2015 17:51:11 -0500
branchGECKO360b1_2015021317_RELBRANCH
changeset 243774 fa98dcdc9406fa36b418b7dc97ebb6a8b7d50ef2
parent 161940 0c91d9aa9476a9c2c6eb01e6142267d7987977e2
child 319501 6c56f5dad3b24506c41d5a38115d19456fe2a802
permissions -rw-r--r--
Added THUNDERBIRD_36_0b1_RELEASE THUNDERBIRD_36_0b1_BUILD2 tag(s) for changeset bbb250fc79b7. DONTBUILD CLOSED TREE a=release

/* 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) {}
  }
};