Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 4 | |
michael@0 | 5 | // We wastefully reload the same JS files across components. This puts all |
michael@0 | 6 | // the common JS files used by safebrowsing and url-classifier into a |
michael@0 | 7 | // single component. |
michael@0 | 8 | |
michael@0 | 9 | const Cc = Components.classes; |
michael@0 | 10 | const Ci = Components.interfaces; |
michael@0 | 11 | const G_GDEBUG = false; |
michael@0 | 12 | |
michael@0 | 13 | Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); |
michael@0 | 14 | |
michael@0 | 15 | #include ./content/moz/lang.js |
michael@0 | 16 | #include ./content/moz/preferences.js |
michael@0 | 17 | #include ./content/moz/debug.js |
michael@0 | 18 | #include ./content/moz/alarm.js |
michael@0 | 19 | #include ./content/moz/cryptohasher.js |
michael@0 | 20 | #include ./content/moz/observer.js |
michael@0 | 21 | #include ./content/moz/protocol4.js |
michael@0 | 22 | |
michael@0 | 23 | #include ./content/request-backoff.js |
michael@0 | 24 | #include ./content/xml-fetcher.js |
michael@0 | 25 | |
michael@0 | 26 | // Expose this whole component. |
michael@0 | 27 | var lib = this; |
michael@0 | 28 | |
michael@0 | 29 | function UrlClassifierLib() { |
michael@0 | 30 | this.wrappedJSObject = lib; |
michael@0 | 31 | } |
michael@0 | 32 | UrlClassifierLib.prototype.classID = Components.ID("{26a4a019-2827-4a89-a85c-5931a678823a}"); |
michael@0 | 33 | UrlClassifierLib.prototype.QueryInterface = XPCOMUtils.generateQI([]); |
michael@0 | 34 | |
michael@0 | 35 | this.NSGetFactory = XPCOMUtils.generateNSGetFactory([UrlClassifierLib]); |