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

Unified Diff: components/sync/driver/data_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
« no previous file with comments | « components/sync/driver/data_type_controller.h ('k') | components/sync/driver/data_type_controller_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/data_type_controller.cc
diff --git a/components/sync/driver/data_type_controller.cc b/components/sync/driver/data_type_controller.cc
index b15e8c321e32d664f0d52943efeb020a4a93d1c5..e68ed4f3ac97c7f910fa6c11f0f9ec94b89ec15a 100644
--- a/components/sync/driver/data_type_controller.cc
+++ b/components/sync/driver/data_type_controller.cc
@@ -10,12 +10,9 @@
namespace sync_driver {
-DataTypeController::DataTypeController(
- const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread,
- const base::Closure& error_callback)
- : base::RefCountedDeleteOnMessageLoop<DataTypeController>(ui_thread),
- error_callback_(error_callback),
- ui_thread_(ui_thread) {}
+DataTypeController::DataTypeController(syncer::ModelType type,
+ const base::Closure& dump_stack)
+ : dump_stack_(dump_stack), type_(type) {}
DataTypeController::~DataTypeController() {}
@@ -27,18 +24,12 @@ bool DataTypeController::IsSuccessfulResult(ConfigureResult result) {
return (result == OK || result == OK_FIRST_RUN);
}
-syncer::SyncError DataTypeController::CreateAndUploadError(
- const tracked_objects::Location& location,
- const std::string& message,
- syncer::ModelType type) {
- if (!error_callback_.is_null())
- error_callback_.Run();
- return syncer::SyncError(location, syncer::SyncError::DATATYPE_ERROR, message,
- type);
-}
-
bool DataTypeController::ReadyForStart() const {
return true;
}
+bool DataTypeController::CalledOnValidThread() const {
+ return thread_checker_.CalledOnValidThread();
+}
+
} // namespace sync_driver
« no previous file with comments | « components/sync/driver/data_type_controller.h ('k') | components/sync/driver/data_type_controller_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698