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

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

Issue 8568028: Sync: Improve handling of database load failures (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
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 26f089f8d11d2d7cb7e35f8e47934e0096d0d991..84af84ff62bb8a396a11cb5ecb1ff45b7582f15a 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -555,11 +555,16 @@ void ProfileSyncService::OnUnrecoverableError(
void ProfileSyncService::OnBackendInitialized(
const WeakHandle<JsBackend>& js_backend, bool success) {
+ if (HasSyncSetupCompleted()) {
+ UMA_HISTOGRAM_BOOLEAN("Sync.FirstBackendInitializeSuccess", success);
+ } else {
+ UMA_HISTOGRAM_BOOLEAN("Sync.RestoreBackendInitializeSuccess", success);
+ }
+
if (!success) {
- // If backend initialization failed, abort. We only want to blow away
- // state (DBs, etc) if this was a first-time scenario that failed.
- wizard_.Step(SyncSetupWizard::FATAL_ERROR);
- Shutdown(!HasSyncSetupCompleted());
+ // Something went unexpectedly wrong. Play it safe: nuke our current state
+ // and prepare ourselves to try again later.
+ DisableForUser();
return;
}
« no previous file with comments | « chrome/browser/sync/internal_api/sync_manager.cc ('k') | chrome/browser/sync/profile_sync_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698