browser/modules/offlineAppCache.jsm
author Geoff Brown <gbrown@mozilla.com>
Thu, 03 Jan 2013 13:02:01 -0700
changeset 117487 386333461d424e5f1e5db7ee619f6c6143a5d1ef
parent 111945 5ce71981e005a52d4cb0b831ad3db9284f2fb356
child 150291 0c91d9aa9476a9c2c6eb01e6142267d7987977e2
permissions -rw-r--r--
Bug 824724 - Allow --remoteTestRoot option in remotecppunittests.py; r=jmaher

/* 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"];

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

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