diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-03 23:12:42 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-03 23:12:42 +0000 |
commit | 79084c2d01586797f762cbb308cb2c204dd9a164 (patch) | |
tree | de83878b22e4641589e8d7ea8bc0fe020c429876 /chrome/browser/privacy_blacklist | |
parent | 755bbc4326d8c6c05900d681e232ec7b069e25c2 (diff) | |
download | chromium_src-79084c2d01586797f762cbb308cb2c204dd9a164.zip chromium_src-79084c2d01586797f762cbb308cb2c204dd9a164.tar.gz chromium_src-79084c2d01586797f762cbb308cb2c204dd9a164.tar.bz2 |
Last patch in removing MessageLoop* caching.
BUG=25354
Review URL: http://codereview.chromium.org/353015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30881 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/privacy_blacklist')
-rw-r--r-- | chrome/browser/privacy_blacklist/blacklist_observer.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/privacy_blacklist/blacklist_observer.cc b/chrome/browser/privacy_blacklist/blacklist_observer.cc index 46d117cc..b62d0c8 100644 --- a/chrome/browser/privacy_blacklist/blacklist_observer.cc +++ b/chrome/browser/privacy_blacklist/blacklist_observer.cc @@ -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 @@ void BlacklistObserver::ContentBlocked(const URLRequest* request) { 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)); } |