[Pkg-mozext-commits] [requestpolicy] 09/280: [refactoring] rename CC to Cc
David Prévot
taffit at moszumanska.debian.org
Sat May 2 20:29:54 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository requestpolicy.
commit 66cd2ab87a0c5e6689ca0cad4aaafbe22a066872
Author: Martin Kimmerle <dev at 256k.de>
Date: Tue Nov 25 04:58:24 2014 +0100
[refactoring] rename CC to Cc
---
src/components/requestpolicyService.js | 22 +++++++++++-----------
src/content/lib/DomainUtil.jsm | 10 +++++-----
src/content/lib/FileUtil.jsm | 16 ++++++++--------
src/content/lib/PolicyManager.jsm | 2 +-
src/content/lib/Request.jsm | 2 +-
src/content/lib/RequestProcessor.jsm | 2 +-
src/content/lib/Util.jsm | 6 +++---
7 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/src/components/requestpolicyService.js b/src/components/requestpolicyService.js
index dd98636..27d7943 100644
--- a/src/components/requestpolicyService.js
+++ b/src/components/requestpolicyService.js
@@ -22,7 +22,7 @@
*/
const Ci = Components.interfaces;
-const CC = Components.classes;
+const Cc = Components.classes;
const CP_OK = Ci.nsIContentPolicy.ACCEPT;
const CP_NOP = function() {
@@ -156,7 +156,7 @@ RequestPolicyService.prototype = {
try {
// For Firefox <= 3.6.
- var em = CC["@mozilla.org/extensions/manager;1"].
+ var em = Cc["@mozilla.org/extensions/manager;1"].
getService(Ci.nsIExtensionManager);
var ext;
for (var i = 0; i < idArray.length; i++) {
@@ -275,7 +275,7 @@ RequestPolicyService.prototype = {
},
_initializeApplicationCompatibility : function() {
- var appInfo = CC["@mozilla.org/xre/app-info;1"].
+ var appInfo = Cc["@mozilla.org/xre/app-info;1"].
getService(Ci.nsIXULAppInfo);
// Mozilla updates (doing this for all applications, not just individual
@@ -512,7 +512,7 @@ RequestPolicyService.prototype = {
},
_register : function() {
- var os = CC['@mozilla.org/observer-service;1'].
+ var os = Cc['@mozilla.org/observer-service;1'].
getService(Ci.nsIObserverService);
os.addObserver(this, "http-on-examine-response", false);
os.addObserver(this, "http-on-modify-request", false);
@@ -537,7 +537,7 @@ RequestPolicyService.prototype = {
_unregister : function() {
try {
- var os = CC['@mozilla.org/observer-service;1'].
+ var os = Cc['@mozilla.org/observer-service;1'].
getService(Ci.nsIObserverService);
os.removeObserver(this, "http-on-examine-response");
os.removeObserver(this, "http-on-modify-request");
@@ -562,7 +562,7 @@ RequestPolicyService.prototype = {
_initializePrefSystem : function() {
// Get the preferences branch and setup the preferences observer.
- this._prefService = CC["@mozilla.org/preferences-service;1"].
+ this._prefService = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefService);
this.prefs = this._prefService.getBranch("extensions.requestpolicy.")
@@ -600,7 +600,7 @@ RequestPolicyService.prototype = {
}
});
} else {
- var em = CC["@mozilla.org/extensions/manager;1"].
+ var em = Cc["@mozilla.org/extensions/manager;1"].
getService(Ci.nsIExtensionManager);
var addon = em.getItemForID(EXTENSION_ID);
this.prefs.setCharPref("lastVersion", addon.version);
@@ -642,7 +642,7 @@ RequestPolicyService.prototype = {
default :
break;
}
- var observerService = CC['@mozilla.org/observer-service;1'].
+ var observerService = Cc['@mozilla.org/observer-service;1'].
getService(Ci.nsIObserverService);
observerService.notifyObservers(null, "requestpolicy-prefs-changed", null);
},
@@ -687,7 +687,7 @@ RequestPolicyService.prototype = {
_initializePrivateBrowsing : function() {
try {
- var pbs = CC["@mozilla.org/privatebrowsing;1"].
+ var pbs = Cc["@mozilla.org/privatebrowsing;1"].
getService(Ci.nsIPrivateBrowsingService);
this._privateBrowsingEnabled = pbs.privateBrowsingEnabled;
} catch (e) {
@@ -699,7 +699,7 @@ RequestPolicyService.prototype = {
if (!this.prefs.getBoolPref("welcomeWindowShown")) {
var url = "chrome://requestpolicy/content/settings/setup.html";
- var wm = CC['@mozilla.org/appshell/window-mediator;1'].
+ var wm = Cc['@mozilla.org/appshell/window-mediator;1'].
getService(Ci.nsIWindowMediator);
var windowtype = 'navigator:browser';
var mostRecentWindow = wm.getMostRecentWindow(windowtype);
@@ -1102,7 +1102,7 @@ RequestPolicyService.prototype = {
// this.rejectCode = typeof(/ /) == "object" ? -4 : -3;
this.rejectCode = Ci.nsIContentPolicy.REJECT_SERVER;
this.mimeService =
- CC['@mozilla.org/uriloader/external-helper-app-service;1']
+ Cc['@mozilla.org/uriloader/external-helper-app-service;1']
.getService(Ci.nsIMIMEService);
}
},
diff --git a/src/content/lib/DomainUtil.jsm b/src/content/lib/DomainUtil.jsm
index ea8c2b9..c3a067e 100644
--- a/src/content/lib/DomainUtil.jsm
+++ b/src/content/lib/DomainUtil.jsm
@@ -31,7 +31,7 @@
var EXPORTED_SYMBOLS = ["DomainUtil"]
const Ci = Components.interfaces;
-const CC = Components.classes;
+const Cc = Components.classes;
if (!rp) {
var rp = {mod : {}};
@@ -41,13 +41,13 @@ Components.utils.import("chrome://requestpolicy/content/lib/Logger.jsm", rp.mod)
var DomainUtil = {};
-DomainUtil._ios = CC["@mozilla.org/network/io-service;1"]
+DomainUtil._ios = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
-DomainUtil._eTLDService = CC["@mozilla.org/network/effective-tld-service;1"]
+DomainUtil._eTLDService = Cc["@mozilla.org/network/effective-tld-service;1"]
.getService(Ci.nsIEffectiveTLDService);
-DomainUtil._idnService = CC["@mozilla.org/network/idn-service;1"]
+DomainUtil._idnService = Cc["@mozilla.org/network/idn-service;1"]
.getService(Ci.nsIIDNService);
const STANDARDURL_CONTRACTID = "@mozilla.org/network/standard-url;1";
@@ -378,7 +378,7 @@ DomainUtil.formatIDNUri = function(uri) {
DomainUtil.determineRedirectUri = function(originUri, destPath) {
var baseUri = this.getUriObject(originUri);
var urlType = Ci.nsIStandardURL.URLTYPE_AUTHORITY;
- var newUri = CC[STANDARDURL_CONTRACTID].createInstance(Ci.nsIStandardURL);
+ var newUri = Cc[STANDARDURL_CONTRACTID].createInstance(Ci.nsIStandardURL);
newUri.init(urlType, 0, destPath, null, baseUri);
var resolvedUri = newUri.QueryInterface(Ci.nsIURI);
return resolvedUri.spec;
diff --git a/src/content/lib/FileUtil.jsm b/src/content/lib/FileUtil.jsm
index af393cb..3f82a61 100644
--- a/src/content/lib/FileUtil.jsm
+++ b/src/content/lib/FileUtil.jsm
@@ -24,7 +24,7 @@
var EXPORTED_SYMBOLS = ["FileUtil"]
const Ci = Components.interfaces;
-const CC = Components.classes;
+const Cc = Components.classes;
Components.utils.import("resource://gre/modules/Services.jsm");
@@ -39,7 +39,7 @@ var FileUtil = {
* file
*/
fileToArray : function(file) {
- var stream = CC["@mozilla.org/network/file-input-stream;1"]
+ var stream = Cc["@mozilla.org/network/file-input-stream;1"]
.createInstance(Ci.nsIFileInputStream);
stream.init(file, 0x01, 0444, 0);
stream.QueryInterface(Ci.nsILineInputStream);
@@ -59,13 +59,13 @@ var FileUtil = {
* file
*/
fileToString : function(file) {
- var stream = CC["@mozilla.org/network/file-input-stream;1"]
+ var stream = Cc["@mozilla.org/network/file-input-stream;1"]
.createInstance(Ci.nsIFileInputStream);
// TODO: Handle NS_ERROR_FILE_NOT_FOUND
stream.init(file, 0x01, 0444, 0);
stream.QueryInterface(Ci.nsILineInputStream);
- var cstream = CC["@mozilla.org/intl/converter-input-stream;1"].
+ var cstream = Cc["@mozilla.org/intl/converter-input-stream;1"].
createInstance(Ci.nsIConverterInputStream);
cstream.init(stream, "UTF-8", 0, 0);
@@ -91,12 +91,12 @@ var FileUtil = {
* file
*/
arrayToFile : function(lines, file) {
- var stream = CC["@mozilla.org/network/file-output-stream;1"]
+ var stream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
// write, create, append on write, truncate
stream.init(file, 0x02 | 0x08 | 0x10 | 0x20, -1, 0);
- var cos = CC["@mozilla.org/intl/converter-output-stream;1"]
+ var cos = Cc["@mozilla.org/intl/converter-output-stream;1"]
.createInstance(Ci.nsIConverterOutputStream);
cos.init(stream, "UTF-8", 4096, 0x0000);
@@ -117,12 +117,12 @@ var FileUtil = {
* file
*/
stringToFile : function(str, file) {
- var stream = CC["@mozilla.org/network/file-output-stream;1"]
+ var stream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
// write, create, append on write, truncate
stream.init(file, 0x02 | 0x08 | 0x10 | 0x20, -1, 0);
- var cos = CC["@mozilla.org/intl/converter-output-stream;1"]
+ var cos = Cc["@mozilla.org/intl/converter-output-stream;1"]
.createInstance(Ci.nsIConverterOutputStream);
cos.init(stream, "UTF-8", 4096, 0x0000);
cos.writeString(str);
diff --git a/src/content/lib/PolicyManager.jsm b/src/content/lib/PolicyManager.jsm
index 84241f9..5edac00 100644
--- a/src/content/lib/PolicyManager.jsm
+++ b/src/content/lib/PolicyManager.jsm
@@ -27,7 +27,7 @@ var EXPORTED_SYMBOLS = [
];
const Ci = Components.interfaces;
-const CC = Components.classes;
+const Cc = Components.classes;
const RULES_CHANGED_TOPIC = "requestpolicy-rules-changed";
diff --git a/src/content/lib/Request.jsm b/src/content/lib/Request.jsm
index 11aad8a..1210822 100644
--- a/src/content/lib/Request.jsm
+++ b/src/content/lib/Request.jsm
@@ -31,7 +31,7 @@ var EXPORTED_SYMBOLS = [
];
const Ci = Components.interfaces;
-const CC = Components.classes;
+const Cc = Components.classes;
const REQUEST_TYPE_NORMAL = 1;
const REQUEST_TYPE_REDIRECT = 2;
diff --git a/src/content/lib/RequestProcessor.jsm b/src/content/lib/RequestProcessor.jsm
index 7cbb35d..600ebff 100644
--- a/src/content/lib/RequestProcessor.jsm
+++ b/src/content/lib/RequestProcessor.jsm
@@ -24,7 +24,7 @@
var EXPORTED_SYMBOLS = ["RequestProcessor"];
const Ci = Components.interfaces;
-const CC = Components.classes;
+const Cc = Components.classes;
const CP_OK = Ci.nsIContentPolicy.ACCEPT;
const CP_REJECT = Ci.nsIContentPolicy.REJECT_SERVER;
diff --git a/src/content/lib/Util.jsm b/src/content/lib/Util.jsm
index 9177204..aecb3db 100644
--- a/src/content/lib/Util.jsm
+++ b/src/content/lib/Util.jsm
@@ -24,15 +24,15 @@
var EXPORTED_SYMBOLS = ["Util"];
const Ci = Components.interfaces;
-const CC = Components.classes;
+const Cc = Components.classes;
const FIREFOX_ID = "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}";
var Util = {
- _versionComparator : CC["@mozilla.org/xpcom/version-comparator;1"]
+ _versionComparator : Cc["@mozilla.org/xpcom/version-comparator;1"]
.getService(Ci.nsIVersionComparator),
- appInfo : CC["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo),
+ appInfo : Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo),
// These need to be set externally. Right now they're set from
// RequestPolicyService._initVersionInfo().
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git
More information about the Pkg-mozext-commits
mailing list