fune/toolkit/components/url-classifier/nsUrlClassifierListManager.js
Thomas Nguyen 62625fef28 Bug 1297614 - Refactor and remove dead code in toolkit/components/url-classifier/content r=francois
MozReview-Commit-ID: GzVGS1ZTRGL

--HG--
extra : rebase_source : ee868b5fb590f4965b17535383327df98504e963
2017-06-30 13:31:03 -07:00

39 lines
1.2 KiB
JavaScript

# 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/.
const Cc = Components.classes;
const Ci = Components.interfaces;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
#include ./content/listmanager.js
var modScope = this;
function Init() {
// Pull the library in.
var jslib = Cc["@mozilla.org/url-classifier/jslib;1"]
.getService().wrappedJSObject;
modScope.BindToObject = jslib.BindToObject;
modScope.RequestBackoffV4 = jslib.RequestBackoffV4;
// We only need to call Init once.
modScope.Init = function() {};
}
function RegistrationData()
{
}
RegistrationData.prototype = {
classID: Components.ID("{ca168834-cc00-48f9-b83c-fd018e58cae3}"),
_xpcom_factory: {
createInstance: function(outer, iid) {
if (outer != null)
throw Components.results.NS_ERROR_NO_AGGREGATION;
Init();
return (new PROT_ListManager()).QueryInterface(iid);
}
},
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RegistrationData]);