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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.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_blocking_page.cc
===================================================================
--- chrome/browser/safe_browsing/safe_browsing_blocking_page.cc (revision 30650)
+++ chrome/browser/safe_browsing/safe_browsing_blocking_page.cc (working copy)
@@ -11,7 +11,7 @@
#include "base/histogram.h"
#include "base/string_util.h"
#include "base/values.h"
-#include "chrome/browser/browser_process.h"
+#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/dom_operation_notification_details.h"
#include "chrome/browser/dom_ui/new_tab_ui.h"
#include "chrome/browser/google_util.h"
@@ -437,15 +437,11 @@
SafeBrowsingService* sb_service,
const UnsafeResourceList& unsafe_resources,
bool proceed) {
- 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(
- sb_service, &SafeBrowsingService::OnBlockingPageDone, unsafe_resources,
- proceed));
+ ChromeThread::PostTask(
+ ChromeThread::IO, FROM_HERE,
+ NewRunnableMethod(
+ sb_service, &SafeBrowsingService::OnBlockingPageDone,
+ unsafe_resources, proceed));
}
// static

Powered by Google App Engine
This is Rietveld 408576698