summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net
diff options
context:
space:
mode:
authoridanan@chromium.org <idanan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 17:47:08 +0000
committeridanan@chromium.org <idanan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 17:47:08 +0000
commit3e7cf136004dd8f5a8e521360b5d602e7b1af0c2 (patch)
tree3f78cab4b9f030786bfb0224e479282770c46d24 /chrome/browser/net
parent7ed6bc6bcd311741da22bf45d8a88f5de89eadf8 (diff)
downloadchromium_src-3e7cf136004dd8f5a8e521360b5d602e7b1af0c2.zip
chromium_src-3e7cf136004dd8f5a8e521360b5d602e7b1af0c2.tar.gz
chromium_src-3e7cf136004dd8f5a8e521360b5d602e7b1af0c2.tar.bz2
Send notice for blackisted non-visual resources
This is just the piping to call into the blocked_popup_container (which shall be later renamed and expanded to a generalized blocked resource container) from the browser's request context. BUG=16932 TEST=none Review URL: http://codereview.chromium.org/171109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r--chrome/browser/net/chrome_url_request_context.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc
index 0aa4fc8..a36887c 100644
--- a/chrome/browser/net/chrome_url_request_context.cc
+++ b/chrome/browser/net/chrome_url_request_context.cc
@@ -450,6 +450,11 @@ bool ChromeURLRequestContext::InterceptCookie(const URLRequest* request,
if (d) {
const Blacklist::Match* match = static_cast<const Blacklist::Match*>(d);
if (match->attributes() & Blacklist::kDontStoreCookies) {
+ NotificationService::current()->Notify(
+ NotificationType::BLACKLIST_BLOCKED_RESOURCE,
+ Source<const ChromeURLRequestContext>(this),
+ Details<const URLRequest>(request));
+
cookie->clear();
return false;
}
@@ -466,8 +471,14 @@ bool ChromeURLRequestContext::AllowSendingCookies(const URLRequest* request)
request->GetUserData(&Blacklist::kRequestDataKey);
if (d) {
const Blacklist::Match* match = static_cast<const Blacklist::Match*>(d);
- if (match->attributes() & Blacklist::kDontSendCookies)
+ if (match->attributes() & Blacklist::kDontSendCookies) {
+ NotificationService::current()->Notify(
+ NotificationType::BLACKLIST_BLOCKED_RESOURCE,
+ Source<const ChromeURLRequestContext>(this),
+ Details<const URLRequest>(request));
+
return false;
+ }
}
return true;
}