Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6976)

Unified Diff: chrome/browser/renderer_host/resource_message_filter.cc

Issue 371063: Integrate BlacklistManager with Profile. (Closed)
Patch Set: trybot fixes Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/renderer_host/resource_dispatcher_host.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/resource_message_filter.cc
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index cb2943326cc6212e4776c1785d8b3d4a9468ee3e..80069600833f896abafe4d69e8f3b664d929bc74 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -25,7 +25,7 @@
#include "chrome/browser/plugin_service.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/privacy_blacklist/blacklist.h"
-#include "chrome/browser/privacy_blacklist/blacklist_observer.h"
+#include "chrome/browser/privacy_blacklist/blacklist_ui.h"
#include "chrome/browser/renderer_host/audio_renderer_host.h"
#include "chrome/browser/renderer_host/browser_render_process_host.h"
#include "chrome/browser/renderer_host/database_dispatcher_host.h"
@@ -211,7 +211,7 @@ void ResourceMessageFilter::OnFilterAdded(IPC::Channel* channel) {
channel_ = channel;
// Add the observers to intercept.
- registrar_.Add(this, NotificationType::BLACKLIST_BLOCKED_RESOURCE,
+ registrar_.Add(this, NotificationType::BLACKLIST_NONVISUAL_RESOURCE_BLOCKED,
NotificationService::AllSources());
}
@@ -465,16 +465,16 @@ void ResourceMessageFilter::OnSetCookie(const GURL& url,
ChromeURLRequestContext* context = GetRequestContextForURL(url);
if (context->cookie_policy()->CanSetCookie(url, first_party_for_cookies)) {
- if (context->blacklist()) {
- Blacklist::Match* match = context->blacklist()->findMatch(url);
- if (match) {
+ const Blacklist* blacklist = context->GetBlacklist();
+ if (blacklist) {
+ scoped_ptr<Blacklist::Match> match(blacklist->findMatch(url));
+ if (match.get()) {
if (match->attributes() & Blacklist::kDontPersistCookies) {
context->cookie_store()->SetCookie(url,
Blacklist::StripCookieExpiry(cookie));
} else if (!(match->attributes() & Blacklist::kDontStoreCookies)) {
context->cookie_store()->SetCookie(url, cookie);
}
- delete match;
return;
}
}
@@ -1020,8 +1020,9 @@ void ResourceMessageFilter::OnUpdateSpellingPanelWithMisspelledWord(
void ResourceMessageFilter::Observe(NotificationType type,
const NotificationSource &source,
const NotificationDetails &details) {
- if (type == NotificationType::BLACKLIST_BLOCKED_RESOURCE) {
- BlacklistObserver::ContentBlocked(Details<const URLRequest>(details).ptr());
+ if (type == NotificationType::BLACKLIST_NONVISUAL_RESOURCE_BLOCKED) {
+ BlacklistUI::OnNonvisualContentBlocked(
+ Details<const URLRequest>(details).ptr());
}
}
« no previous file with comments | « chrome/browser/renderer_host/resource_dispatcher_host.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698