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

Unified Diff: chrome/browser/sync/glue/favicon_cache.cc

Issue 1143343005: chrome/browser: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 6 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/sync/glue/favicon_cache.cc
diff --git a/chrome/browser/sync/glue/favicon_cache.cc b/chrome/browser/sync/glue/favicon_cache.cc
index 569644aa0cc1f218c5aad661efe19ff0c25d92a1..c2afd60970698799451f9ff81459ace3c87ddb9f 100644
--- a/chrome/browser/sync/glue/favicon_cache.cc
+++ b/chrome/browser/sync/glue/favicon_cache.cc
@@ -4,8 +4,10 @@
#include "chrome/browser/sync/glue/favicon_cache.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
#include "base/metrics/histogram.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/history/history_service_factory.h"
#include "components/favicon/core/favicon_service.h"
@@ -533,13 +535,10 @@ void FaviconCache::OnReceivedSyncFavicon(const GURL& page_url,
// Post a task to do the actual association because this method may have been
// called while in a transaction.
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&FaviconCache::OnReceivedSyncFaviconImpl,
- weak_ptr_factory_.GetWeakPtr(),
- icon_url,
- icon_bytes,
- visit_time_ms));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&FaviconCache::OnReceivedSyncFaviconImpl,
+ weak_ptr_factory_.GetWeakPtr(), icon_url,
+ icon_bytes, visit_time_ms));
}
void FaviconCache::OnReceivedSyncFaviconImpl(

Powered by Google App Engine
This is Rietveld 408576698