Skip to content

Commit 8795a9c

Browse files
committed
More formatting fixes
1 parent 68421bc commit 8795a9c

4 files changed

Lines changed: 8 additions & 17 deletions

File tree

chromium/rules.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,6 @@ RuleSets.prototype = {
249249
// Check to see if the Cookie object c meets any of our cookierule citeria
250250
// for being marked as secure. knownHttps is true if the context for this
251251
// cookie being set is known to be https.
252-
//log(DBUG, "Testing cookie:");
253-
//log(DBUG, " name: " + cookie.name);
254-
//log(DBUG, " host: " + cookie.host);
255-
//log(DBUG, " domain: " + cookie.domain);
256-
//log(DBUG, " rawhost: " + cookie.rawHost);
257252
var hostname = cookie.domain;
258253
// cookie domain scopes can start with .
259254
while (hostname.charAt(0) == ".")
@@ -272,10 +267,6 @@ RuleSets.prototype = {
272267
if (cr.host_c.test(cookie.domain) && cr.name_c.test(cookie.name)) {
273268
return ruleset;
274269
}
275-
//log(WARN, "no match domain " + cr.host_c.test(cookie.domain) +
276-
// " name " + cr.name_c.test(cookie.name));
277-
//log(WARN, "with " + cookie.domain + " " + cookie.name);
278-
//log(WARN, "and " + cr.host + " " + cr.name);
279270
}
280271
}
281272
}

src/chrome/content/code/HTTPS.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ const HTTPS = {
156156

157157
handleInsecureCookie: function(c) {
158158
if (HTTPSRules.shouldSecureCookie(null, c, false)) {
159-
this.log(INFO, "Securing cookie from event: " + c.domain + " " + c.name);
159+
this.log(INFO, "Securing cookie from event: " + c.host + " " + c.name);
160160
var cookieManager = Components.classes["@mozilla.org/cookiemanager;1"]
161161
.getService(Components.interfaces.nsICookieManager2);
162162
//some braindead cookies apparently use umghzabilliontrabilions

src/chrome/content/code/HTTPSRules.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ const HTTPSRules = {
493493
// Why does JS have no tuples, again?
494494
var blob = {}; blob.newuri = null;
495495
if (!alist) this.log(DBUG, "No applicable list rewriting " + input_uri.spec);
496-
this.log(NOTE, "Processing " + input_uri.spec);
496+
this.log(DBUG, "Processing " + input_uri.spec);
497497

498498
var uri = this.sanitiseURI(input_uri);
499499

@@ -709,7 +709,7 @@ const HTTPSRules = {
709709
// @c : an nsICookie2
710710
// @known_https : true if we know the page setting the cookie is https
711711

712-
this.log(DBUG," rawhost: " + c.rawHost + "\n name: " + c.name + "\n host" + c.host);
712+
this.log(DBUG," rawhost: " + c.rawHost + " name: " + c.name + " host" + c.host);
713713
var i,j;
714714
var rs = this.potentiallyApplicableRulesets(c.host);
715715
for (i = 0; i < rs.length; ++i) {

src/components/https-everywhere.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// LOG LEVELS ---
2-
1+
// LOG LEVELS
32
let VERB=1;
43
let DBUG=2;
54
let INFO=3;
@@ -18,7 +17,6 @@ let https_everywhere_blacklist = {};
1817
// domains for which there is at least one blacklisted URL
1918
let https_blacklist_domains = {};
2019

21-
//
2220
const CI = Components.interfaces;
2321
const CC = Components.classes;
2422
const CU = Components.utils;
@@ -333,7 +331,9 @@ HTTPSEverywhere.prototype = {
333331
loadContext = channel.loadGroup.notificationCallbacks
334332
.getInterface(CI.nsILoadContext);
335333
} catch(e) {
336-
this.log(NOTE, "no loadGroup notificationCallbacks for "
334+
// Lots of requests have no notificationCallbacks, mostly background
335+
// ones like OCSP checks or smart browsing fetches.
336+
this.log(DBUG, "no loadGroup notificationCallbacks for "
337337
+ channel.URI.spec + ": " + e);
338338
return null;
339339
}
@@ -835,7 +835,7 @@ function https_everywhereLog(level, str) {
835835
threshold = WARN;
836836
}
837837
if (level >= threshold) {
838-
var levelName = ["", "VERB", "DBUG", "INFO", "NOTE", "WARN"][+level];
838+
var levelName = ["", "VERB", "DBUG", "INFO", "NOTE", "WARN"][level];
839839
var prefix = "HTTPS Everywhere " + levelName + ": ";
840840
// dump() prints to browser stdout. That's sometimes undesireable,
841841
// so only do it when a pref is set (running from test.sh enables

0 commit comments

Comments
 (0)