Bug 1039012: Only cancel third party channels with NS_ERROR_TRACKING_URI (r=gcp,briansmith)

This commit is contained in:
Monica Chew
2014-07-24 10:59:00 -07:00
parent 728cbf3572
commit c57be339f4
4 changed files with 33 additions and 4 deletions

View File

@@ -1215,6 +1215,7 @@ nsUrlClassifierDBService::Init()
// nsChannelClassifier is the only consumer of this interface.
NS_IMETHODIMP
nsUrlClassifierDBService::Classify(nsIPrincipal* aPrincipal,
bool aTrackingProtectionEnabled,
nsIURIClassifierCallback* c,
bool* result)
{
@@ -1246,8 +1247,8 @@ nsUrlClassifierDBService::Classify(nsIPrincipal* aPrincipal,
}
nsAutoCString tracking;
Preferences::GetCString(TRACKING_TABLE_PREF, &tracking);
if (!tracking.IsEmpty()) {
LOG(("Looking up in tracking table, [cb=%p]", callback.get()));
if (aTrackingProtectionEnabled && !tracking.IsEmpty()) {
LOG(("Looking up third party in tracking table, [cb=%p]", callback.get()));
tables.Append(',');
tables.Append(tracking);
}