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

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

Issue 2339403004: [Sync] Add two more USS integration tests. (Closed)
Patch Set: Address comments. 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/non_blocking_data_type_controller.h
diff --git a/components/sync/driver/non_blocking_data_type_controller.h b/components/sync/driver/non_blocking_data_type_controller.h
index 9091cc576de0f011b1ae29732654fa123ba028f9..d81b8311f1932cb10557e8c851016e3f6f095fb2 100644
--- a/components/sync/driver/non_blocking_data_type_controller.h
+++ b/components/sync/driver/non_blocking_data_type_controller.h
@@ -97,6 +97,12 @@ class NonBlockingDataTypeController : public sync_driver::DataTypeController {
// callback and must temporarily own it until ActivateDataType is called.
std::unique_ptr<syncer_v2::ActivationContext> activation_context_;
+ // This is a hack to prevent reconfigurations from crashing, because USS
+ // activation is not idempotent. RegisterWithBackend only needs to actually do
+ // something the first time after the type is enabled.
+ // TODO(crbug.com/647505): Remove this once the DTM handles things better.
+ bool activated_ = false;
+
DISALLOW_COPY_AND_ASSIGN(NonBlockingDataTypeController);
};

Powered by Google App Engine
This is Rietveld 408576698