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

Unified Diff: components/sync/driver/ui_model_type_controller.cc

Issue 2289143003: [Sync] Convert DTCs to be not RefCounted and NonThreadSafe. (Closed)
Patch Set: Rebase. Created 4 years, 3 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_model_type_controller.cc
diff --git a/components/sync/driver/ui_model_type_controller.cc b/components/sync/driver/ui_model_type_controller.cc
index 7e42040cb60f7314df9229dce971269e990ca682..d817061317aea3060bdb1c493285c5dff45c1b48 100644
--- a/components/sync/driver/ui_model_type_controller.cc
+++ b/components/sync/driver/ui_model_type_controller.cc
@@ -13,30 +13,19 @@ namespace sync_driver_v2 {
using sync_driver::SyncClient;
-UIModelTypeController::UIModelTypeController(
- const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread,
- const base::Closure& error_callback,
- syncer::ModelType model_type,
- SyncClient* sync_client)
- : NonBlockingDataTypeController(ui_thread,
- error_callback,
- model_type,
- sync_client) {}
+UIModelTypeController::UIModelTypeController(syncer::ModelType type,
+ const base::Closure& dump_stack,
+ SyncClient* sync_client)
+ : NonBlockingDataTypeController(type, dump_stack, sync_client) {}
UIModelTypeController::~UIModelTypeController() {}
bool UIModelTypeController::RunOnModelThread(
const tracked_objects::Location& from_here,
const base::Closure& task) {
- RunOnUIThread(from_here, task);
- return true;
-}
-
-void UIModelTypeController::RunOnUIThread(
- const tracked_objects::Location& from_here,
- const base::Closure& task) {
- DCHECK(BelongsToUIThread());
+ DCHECK(CalledOnValidThread());
task.Run();
+ return true;
}
} // namespace sync_driver_v2
« no previous file with comments | « components/sync/driver/ui_model_type_controller.h ('k') | components/sync/driver/ui_model_type_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698