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

Unified Diff: components/sync_driver/ui_data_type_controller.cc

Issue 1144153004: components: 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, 7 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: components/sync_driver/ui_data_type_controller.cc
diff --git a/components/sync_driver/ui_data_type_controller.cc b/components/sync_driver/ui_data_type_controller.cc
index 0f5093fa00072eb900d648e47d4fe424ae27af52..ff74f6e2820170fd23d4e2b3971dbd69ce0d386b 100644
--- a/components/sync_driver/ui_data_type_controller.cc
+++ b/components/sync_driver/ui_data_type_controller.cc
@@ -4,9 +4,11 @@
#include "components/sync_driver/ui_data_type_controller.h"
+#include "base/location.h"
#include "base/logging.h"
#include "base/memory/weak_ptr.h"
#include "base/profiler/scoped_tracker.h"
+#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "components/sync_driver/generic_change_processor_factory.h"
#include "components/sync_driver/shared_change_processor_ref.h"
@@ -98,7 +100,7 @@ void UIDataTypeController::StartAssociating(
start_callback_ = start_callback;
state_ = ASSOCIATING;
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&UIDataTypeController::Associate, this));
}
@@ -364,7 +366,7 @@ void UIDataTypeController::OnSingleDataTypeUnrecoverableError(
if (!error_callback_.is_null())
error_callback_.Run();
if (!model_load_callback_.is_null()) {
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(model_load_callback_, type(), error));
}
}
« no previous file with comments | « components/sync_driver/shared_change_processor_unittest.cc ('k') | components/sync_driver/ui_data_type_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698