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

Unified Diff: chrome/browser/sync/glue/bookmark_model_associator.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/bookmark_model_associator.cc
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.cc b/chrome/browser/sync/glue/bookmark_model_associator.cc
index 179a9dc2703cf887eb26324b5c1799ee0179c719..1a0493b82283a3a1edd5d196ab3a5f912512dcac 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.cc
+++ b/chrome/browser/sync/glue/bookmark_model_associator.cc
@@ -10,12 +10,13 @@
#include "base/format_macros.h"
#include "base/location.h"
#include "base/macros.h"
-#include "base/message_loop/message_loop.h"
#include "base/metrics/field_trial.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/glue/bookmark_change_processor.h"
#include "chrome/browser/undo/bookmark_undo_service_factory.h"
@@ -976,11 +977,9 @@ void BookmarkModelAssociator::PostPersistAssociationsTask() {
// No need to post a task if a task is already pending.
if (weak_factory_.HasWeakPtrs())
return;
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(
- &BookmarkModelAssociator::PersistAssociations,
- weak_factory_.GetWeakPtr()));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&BookmarkModelAssociator::PersistAssociations,
+ weak_factory_.GetWeakPtr()));
}
void BookmarkModelAssociator::PersistAssociations() {

Powered by Google App Engine
This is Rietveld 408576698