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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service.cc

Issue 342068: Third patch in getting rid of caching MessageLoop pointers and always using C... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months 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/safe_browsing/safe_browsing_service.cc
===================================================================
--- chrome/browser/safe_browsing/safe_browsing_service.cc (revision 30650)
+++ chrome/browser/safe_browsing/safe_browsing_service.cc (working copy)
@@ -258,13 +258,10 @@
// Just act as "Don't Proceed" was chosen.
std::vector<UnsafeResource> resources;
resources.push_back(resource);
- MessageLoop* message_loop;
- if (g_browser_process->io_thread())
- message_loop = g_browser_process->io_thread()->message_loop();
- else // For unit-tests, just post on the current thread.
- message_loop = MessageLoop::current();
- message_loop->PostTask(FROM_HERE, NewRunnableMethod(
- this, &SafeBrowsingService::OnBlockingPageDone, resources, false));
+ ChromeThread::PostTask(
+ ChromeThread::IO, FROM_HERE,
+ NewRunnableMethod(
+ this, &SafeBrowsingService::OnBlockingPageDone, resources, false));
return;
}
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc ('k') | chrome/browser/spellcheck_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698