Index: chrome/browser/sync/glue/sync_backend_host.cc |
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc |
index 2e275a2501422c5134ad1bdb24904ab8deff3ab1..b99c4f1f67ad5342fded8967a6879fd0d03fd49e 100644 |
--- a/chrome/browser/sync/glue/sync_backend_host.cc |
+++ b/chrome/browser/sync/glue/sync_backend_host.cc |
@@ -676,8 +676,8 @@ void SyncBackendHost::ConfigureDataTypes( |
// downloaded if they are enabled. |
// |
// The SyncBackendRegistrar's state was initially derived from the types |
- // marked initial_sync_ended when the sync database was loaded. Afterwards it |
- // is modified only by this function. We expect it to remain in sync with the |
+ // detected to have been downloaded in the database. Afterwards it is |
+ // modified only by this function. We expect it to remain in sync with the |
// backend because configuration requests are never aborted; they are retried |
// until they succeed or the browser is closed. |
Nicolas Zea
2012/12/10 22:50:38
nit: s/browser is closed/backend is shut down
rlarocque
2012/12/11 01:44:48
Done.
|
@@ -692,10 +692,10 @@ void SyncBackendHost::ConfigureDataTypes( |
// prepared to handle a migration during a configure, so we must ensure that |
// all our types_to_download actually contain no data before we sync them. |
// |
- // The most common way to end up in this situation used to be types which had |
- // !initial_sync_ended, but did have some progress markers. We avoid problems |
- // with those types by purging the data of any such partially synced types |
- // soon after we load the directory. |
+ // One common way to end up in this situation used to be types which |
+ // downloaded some or all of their data but have not applied it yet. We avoid |
+ // problems with those types by purging the data of any such partially synced |
+ // types soon after we load the directory. |
// |
// Another possible scenario is that we have newly supported or newly enabled |
// data types being downloaded here but the nigori type, which is always |
@@ -1239,6 +1239,15 @@ void SyncBackendHost::Core::DoInitialProcessControlTypes() { |
return; |
} |
+ if (!sync_manager_->InitialSyncEndedTypes().HasAll(syncer::ControlTypes())) { |
+ DVLOG(ERROR) << "Failed to download control types"; |
Nicolas Zea
2012/12/10 22:50:38
I think it makes sense for this to be a LOG(ERROR)
rlarocque
2012/12/11 01:44:48
Done.
|
+ host_.Call( |
+ FROM_HERE, |
+ &SyncBackendHost::HandleInitializationCompletedOnFrontendLoop, |
+ false); |
+ return; |
+ } |
+ |
// Initialize device info. This is asynchronous on some platforms, so we |
// provide a callback for when it finishes. |
synced_device_tracker_.reset( |