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

Unified Diff: components/sync_driver/data_type_manager_impl.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/data_type_manager_impl.cc
diff --git a/components/sync_driver/data_type_manager_impl.cc b/components/sync_driver/data_type_manager_impl.cc
index 092f3625fdf2e0d979f9e4eebbf783a10360bdeb..52b535f3dbd0f1aba77cf14c0b985e1b615d02a2 100644
--- a/components/sync_driver/data_type_manager_impl.cc
+++ b/components/sync_driver/data_type_manager_impl.cc
@@ -128,7 +128,6 @@ void DataTypeManagerImpl::ReenableType(syncer::ModelType type) {
}
void DataTypeManagerImpl::ResetDataTypeErrors() {
- DCHECK_EQ(state_, CONFIGURED);
data_type_status_table_.Reset();
}
@@ -265,14 +264,14 @@ void DataTypeManagerImpl::Restart(syncer::ConfigureReason reason) {
if (state_ == STOPPED || state_ == CONFIGURED)
NotifyStart();
- model_association_manager_.Initialize(enabled_types);
-
+ state_ = DOWNLOAD_PENDING;
download_types_queue_ = PrioritizeTypes(enabled_types);
association_types_queue_ = std::queue<AssociationTypesInfo>();
+ model_association_manager_.Initialize(enabled_types);
+
// Tell the backend about the new set of data types we wish to sync.
// The task will be invoked when updates are downloaded.
- state_ = DOWNLOAD_PENDING;
configurer_->ConfigureDataTypes(
reason,
BuildDataTypeConfigStateMap(download_types_queue_.front()),
@@ -442,8 +441,6 @@ void DataTypeManagerImpl::OnSingleDataTypeWillStop(
needs_reconfigure_ = true;
last_configure_reason_ = syncer::CONFIGURE_REASON_PROGRAMMATIC;
ProcessReconfigure();
- } else {
- DCHECK_EQ(state_, CONFIGURING);
}
}
}
« no previous file with comments | « chrome/browser/sync/glue/typed_url_data_type_controller.cc ('k') | components/sync_driver/data_type_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698