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

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 10520010: Not for review: Support sync init with missing or corrupt store (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Documentation Created 8 years, 6 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: chrome/browser/sync/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 7ad73734f1988f50da35cbbf6d41d8071995195a..16df481f4c4150be09b7ec5f7c84adbb6a00413e 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -329,14 +329,6 @@ void ProfileSyncService::InitializeBackend(bool delete_stale_data) {
return;
}
- syncable::ModelTypeSet initial_types;
- // If sync setup hasn't finished, we don't want to initialize routing info
- // for any data types so that we don't download updates for types that the
- // user chooses not to sync on the first DownloadUpdatesCommand.
- if (HasSyncSetupCompleted()) {
- initial_types = GetPreferredDataTypes();
- }
-
SyncCredentials credentials = GetCredentials();
scoped_refptr<net::URLRequestContextGetter> request_context_getter(
@@ -353,7 +345,6 @@ void ProfileSyncService::InitializeBackend(bool delete_stale_data) {
this,
MakeWeakHandle(sync_js_controller_.AsWeakPtr()),
sync_service_url_,
- initial_types,
credentials,
delete_stale_data,
backend_unrecoverable_error_handler_.get(),
@@ -652,12 +643,9 @@ void ProfileSyncService::OnBackendInitialized(
}
if (!success) {
- // Something went unexpectedly wrong. Play it safe: stop syncing at once
- // and surface error UI to alert the user sync has stopped.
- // Keep the directory around for now so that on restart we will retry
- // again and potentially succeed in presence of transient file IO failures
- // or permissions issues, etc.
- OnUnrecoverableErrorImpl(FROM_HERE, "BackendInitialize failure", false);
+ // Something went unexpectedly wrong. Stop syncing at once and surface
+ // error UI to alert the user sync has stopped.
+ OnUnrecoverableErrorImpl(FROM_HERE, "BackendInitialize failure", true);
return;
}

Powered by Google App Engine
This is Rietveld 408576698