michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: const nsIQuotaManager = Components.interfaces.nsIQuotaManager; michael@0: michael@0: let gURI = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService).newURI("http://localhost", null, null); michael@0: michael@0: function onUsageCallback(uri, usage, fileUsage) {} michael@0: michael@0: function onLoad() michael@0: { michael@0: var quotaManager = Components.classes["@mozilla.org/dom/quota/manager;1"] michael@0: .getService(nsIQuotaManager); michael@0: var quotaRequest = quotaManager.getUsageForURI(gURI, onUsageCallback); michael@0: quotaRequest.cancel(); michael@0: Components.classes["@mozilla.org/observer-service;1"] michael@0: .getService(Components.interfaces.nsIObserverService) michael@0: .notifyObservers(window, "bug839193-loaded", null); michael@0: } michael@0: michael@0: function onUnload() michael@0: { michael@0: Components.classes["@mozilla.org/observer-service;1"] michael@0: .getService(Components.interfaces.nsIObserverService) michael@0: .notifyObservers(window, "bug839193-unloaded", null); michael@0: }