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

Unified Diff: components/sync_driver/model_association_manager.cc

Issue 585643003: [Sync] Fix error handling during startup scenarios (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test Created 6 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/model_association_manager.cc
diff --git a/components/sync_driver/model_association_manager.cc b/components/sync_driver/model_association_manager.cc
index 658b1bfc494ee6d8c1f1dd574f0b682c039ebd3f..6706c4c0ac859ce66985743e5e4d6f330ecd76c4 100644
--- a/components/sync_driver/model_association_manager.cc
+++ b/components/sync_driver/model_association_manager.cc
@@ -288,11 +288,6 @@ void ModelAssociationManager::ModelLoadCallback(syncer::ModelType type,
DVLOG(1) << "ModelAssociationManager: ModelLoadCallback for "
<< syncer::ModelTypeToString(type);
- // This happens when slow loading type is disabled by new configuration.
- if (!desired_types_.Has(type))
- return;
-
- DCHECK(!loaded_types_.Has(type));
if (error.IsSet()) {
syncer::SyncMergeResult local_merge_result(type);
local_merge_result.set_error(error);
@@ -304,6 +299,11 @@ void ModelAssociationManager::ModelLoadCallback(syncer::ModelType type,
return;
}
+ // This happens when slow loading type is disabled by new configuration.
+ if (!desired_types_.Has(type))
+ return;
+
+ DCHECK(!loaded_types_.Has(type));
loaded_types_.Put(type);
if (associating_types_.Has(type)) {
DataTypeController* dtc = controllers_->find(type)->second.get();
« no previous file with comments | « components/sync_driver/fake_data_type_controller.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