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

Unified Diff: components/sync/driver/non_ui_data_type_controller.h

Issue 2257523003: [Sync] Move StartAssociation from NonUIDataTypeController to SharedChangeProcessor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move local_service_ WeakPtr to SharedChangeProcessor. Created 4 years, 4 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/non_ui_data_type_controller.h
diff --git a/components/sync/driver/non_ui_data_type_controller.h b/components/sync/driver/non_ui_data_type_controller.h
index 3dcabaa3a93e35c2e032458b786129cae8de3a0c..0dda52630c9c44065690fea5794360f77b6e4be0 100644
--- a/components/sync/driver/non_ui_data_type_controller.h
+++ b/components/sync/driver/non_ui_data_type_controller.h
@@ -69,24 +69,13 @@ class NonUIDataTypeController : public DirectoryDataTypeController {
const base::Closure& task) = 0;
// Start up complete, update the state and invoke the callback.
- // Note: this is performed on the datatype's thread.
virtual void StartDone(DataTypeController::ConfigureResult start_result,
const syncer::SyncMergeResult& local_merge_result,
const syncer::SyncMergeResult& syncer_merge_result);
- // UI thread implementation of StartDone.
- virtual void StartDoneImpl(
- DataTypeController::ConfigureResult start_result,
- DataTypeController::State new_state,
- const syncer::SyncMergeResult& local_merge_result,
- const syncer::SyncMergeResult& syncer_merge_result);
-
// Kick off the association process.
virtual bool StartAssociationAsync();
- // Record association time.
- virtual void RecordAssociationTime(base::TimeDelta time);
-
// Record causes of start failure.
virtual void RecordStartFailure(ConfigureResult result);
@@ -108,13 +97,11 @@ class NonUIDataTypeController : public DirectoryDataTypeController {
// NULL. Must be called only by StartDoneImpl() or Stop() (on the
// UI thread) and only after a call to Start() (i.e.,
// |shared_change_processor_| must be non-NULL).
- void ClearSharedChangeProcessor();
+ void DisconnectSharedChangeProcessor();
- // Posts StopLocalService() to the datatype's thread.
- void StopLocalServiceAsync();
-
- // Calls local_service_->StopSyncing() and releases our references to it.
- void StopLocalService();
+ // Posts StopLocalService() to the processor on the model type thread and then
+ // clears our reference to the processor.
+ void StopServiceAndClearProcessor();
// Abort model loading and trigger the model load callback.
void AbortModelLoad();
@@ -152,13 +139,6 @@ class NonUIDataTypeController : public DirectoryDataTypeController {
// reference).
scoped_refptr<SharedChangeProcessor> shared_change_processor_;
- // A weak pointer to the actual local syncable service, which performs all the
- // real work. We do not own the object, and it is only safe to access on the
- // DataType's thread.
- // Lifetime: it gets set in StartAssociationWithSharedChangeProcessor(...)
- // and released in StopLocalService().
- base::WeakPtr<syncer::SyncableService> local_service_;
-
scoped_refptr<base::SingleThreadTaskRunner> ui_thread_;
};
« no previous file with comments | « components/sync/base/bind_to_task_runner_unittest.cc ('k') | components/sync/driver/non_ui_data_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698