Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/contentPolicy.js

Issue 9043026: Adapted private browsing handling to per-window private browsing in Firefox 20 (Closed)
Patch Set: Created Dec. 18, 2012, 2:57 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/contentPolicy.js
===================================================================
--- a/lib/contentPolicy.js
+++ b/lib/contentPolicy.js
@@ -191,17 +191,17 @@ let Policy = exports.Policy =
if (Utils.verifySignature(key, signature, params.join("\0")))
match = keyMatch;
}
}
}
if (match instanceof WhitelistFilter)
{
- FilterStorage.increaseHitCount(match);
+ FilterStorage.increaseHitCount(match, wnd);
RequestNotifier.addNodeData(testWnd.document, topWnd, Policy.type.DOCUMENT, getHostname(parentWndLocation), false, testWndLocation, match);
return true;
}
if (testWnd.parent == testWnd)
break;
else
testWnd = testWnd.parent;
@@ -224,17 +224,17 @@ let Policy = exports.Policy =
while (true)
{
let testWndLocation = parentWndLocation;
parentWndLocation = (testWnd == testWnd.parent ? testWndLocation : getWindowLocation(testWnd.parent));
let parentDocDomain = getHostname(parentWndLocation);
match = defaultMatcher.matchesAny(testWndLocation, "ELEMHIDE", parentDocDomain, false);
if (match instanceof WhitelistFilter)
{
- FilterStorage.increaseHitCount(match);
+ FilterStorage.increaseHitCount(match, wnd);
RequestNotifier.addNodeData(testWnd.document, topWnd, contentType, parentDocDomain, false, testWndLocation, match);
return true;
}
if (testWnd.parent == testWnd)
break;
else
testWnd = testWnd.parent;
@@ -245,17 +245,17 @@ let Policy = exports.Policy =
location = locationText;
if (!match.isActiveOnDomain(docDomain))
return true;
let exception = ElemHide.getException(match, docDomain);
if (exception)
{
- FilterStorage.increaseHitCount(exception);
+ FilterStorage.increaseHitCount(exception, wnd);
RequestNotifier.addNodeData(node, topWnd, contentType, docDomain, thirdParty, locationText, exception);
return true;
}
}
let thirdParty = (contentType == Policy.type.ELEMHIDE ? false : isThirdParty(location, docDomain));
if (!match && Prefs.enabled)
@@ -274,17 +274,17 @@ let Policy = exports.Policy =
node.addEventListener("mouseover", objectMouseEventHander, true);
node.addEventListener("mouseout", objectMouseEventHander, true);
}
}
// Store node data
RequestNotifier.addNodeData(node, topWnd, contentType, docDomain, thirdParty, locationText, match);
if (match)
- FilterStorage.increaseHitCount(match);
+ FilterStorage.increaseHitCount(match, wnd);
return !match || match instanceof WhitelistFilter;
},
/**
* Checks whether the location's scheme is blockable.
* @param location {nsIURI}
* @return {Boolean}
« no previous file with comments | « chrome/content/ui/sendReport.js ('k') | lib/filterStorage.js » ('j') | lib/filterStorage.js » ('J')

Powered by Google App Engine
This is Rietveld