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

Unified Diff: components/sync_driver/non_blocking_data_type_controller.cc

Issue 1848793006: [Sync] Register USS types with ModelTypeRegistry before download (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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_blocking_data_type_controller.cc
diff --git a/components/sync_driver/non_blocking_data_type_controller.cc b/components/sync_driver/non_blocking_data_type_controller.cc
index 5ec4e26dac5d9a961123f8b2adca640ffe21e227..9af598bdf3cb8d53885ce0e8e06273edaa47b2da 100644
--- a/components/sync_driver/non_blocking_data_type_controller.cc
+++ b/components/sync_driver/non_blocking_data_type_controller.cc
@@ -131,6 +131,16 @@ void NonBlockingDataTypeController::OnProcessorStartedOnUIThread(
LoadModelsDone(result, error);
}
+void NonBlockingDataTypeController::RegisterWithBackend(
+ sync_driver::BackendDataTypeConfigurer* configurer) {
+ DCHECK(BelongsToUIThread());
+ DCHECK(configurer);
+ DCHECK(activation_context_);
+ DCHECK_EQ(MODEL_LOADED, state_);
+ configurer->ActivateNonBlockingDataType(type(),
+ std::move(activation_context_));
+}
+
void NonBlockingDataTypeController::StartAssociating(
const StartCallback& start_callback) {
DCHECK(BelongsToUIThread());
@@ -147,10 +157,8 @@ void NonBlockingDataTypeController::ActivateDataType(
sync_driver::BackendDataTypeConfigurer* configurer) {
DCHECK(BelongsToUIThread());
DCHECK(configurer);
- DCHECK(activation_context_);
+ DCHECK(!activation_context_);
skym 2016/04/01 21:58:21 Can you add a comment to ActivateDataType explaini
pavely 2016/04/04 17:57:16 Done.
DCHECK_EQ(RUNNING, state_);
- configurer->ActivateNonBlockingDataType(type(),
- std::move(activation_context_));
}
void NonBlockingDataTypeController::DeactivateDataType(

Powered by Google App Engine
This is Rietveld 408576698