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

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

Issue 2471943002: [Sync] Make ModelTypeController::DeactivateDataType idempotent (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | components/sync/driver/model_type_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/model_type_controller.cc
diff --git a/components/sync/driver/model_type_controller.cc b/components/sync/driver/model_type_controller.cc
index 43d4e1459a43d87b56f3d57fa37eb751ea60d93f..313c8c4d5b3ba5a97f6ce1fca7230ed79ba061df 100644
--- a/components/sync/driver/model_type_controller.cc
+++ b/components/sync/driver/model_type_controller.cc
@@ -168,9 +168,10 @@ void ModelTypeController::DeactivateDataType(
BackendDataTypeConfigurer* configurer) {
DCHECK(CalledOnValidThread());
DCHECK(configurer);
- DCHECK(activated_);
- configurer->DeactivateNonBlockingDataType(type());
- activated_ = false;
+ if (activated_) {
+ configurer->DeactivateNonBlockingDataType(type());
+ activated_ = false;
+ }
}
void ModelTypeController::Stop() {
« no previous file with comments | « no previous file | components/sync/driver/model_type_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698