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

Unified Diff: chrome/browser/privacy_blacklist/blacklist_observer.cc

Issue 353015: Last patch in removing MessageLoop* caching. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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
Index: chrome/browser/privacy_blacklist/blacklist_observer.cc
===================================================================
--- chrome/browser/privacy_blacklist/blacklist_observer.cc (revision 30863)
+++ chrome/browser/privacy_blacklist/blacklist_observer.cc (working copy)
@@ -8,6 +8,7 @@
#include "app/resource_bundle.h"
#include "base/string16.h"
#include "chrome/browser/blocked_popup_container.h"
+#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/privacy_blacklist/blacklist.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
@@ -63,11 +64,9 @@
const ResourceDispatcherHostRequestInfo* info =
ResourceDispatcherHost::InfoForRequest(request);
const GURL& gurl = request->url();
- BlockedContentNotice* task = new BlockedContentNotice(gurl, match, info);
- // Notify the UI that something non-visual has been blocked. We can
- // safely cast the delegate to the ResourceDispatherHost because it
- // is the only place where Blacklist::Match data is added to requests.
- static_cast<ResourceDispatcherHost*>(request->delegate())->
- ui_loop()->PostTask(FROM_HERE, task);
+ // Notify the UI that something non-visual has been blocked.
+ ChromeThread::PostTask(
+ ChromeThread::UI, FROM_HERE,
+ new BlockedContentNotice(gurl, match, info));
}

Powered by Google App Engine
This is Rietveld 408576698