summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/profile_sync_service.cc
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-14 01:31:36 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-14 01:31:36 +0000
commit7f8abea4d5728b1b94fe38702a0021e2e4a82abb (patch)
tree19a2cb9608ffe226b63b75d0e9c74def324d1f8c /chrome/browser/sync/profile_sync_service.cc
parentfd013932faa095a8384dd183874fe7a2ee6986d5 (diff)
downloadchromium_src-7f8abea4d5728b1b94fe38702a0021e2e4a82abb.zip
chromium_src-7f8abea4d5728b1b94fe38702a0021e2e4a82abb.tar.gz
chromium_src-7f8abea4d5728b1b94fe38702a0021e2e4a82abb.tar.bz2
Handle birthday errors by disabling sync and deleting sync data. Also added some CV broadcasts in SyncerThread, as changing vault_ fields and not signalling seems dubious (and I caught a hang in the debugger where the thread was waiting for an already true condition, thus deadlocked).
BUG=46807,39070 Review URL: http://codereview.chromium.org/2923006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/profile_sync_service.cc')
-rw-r--r--chrome/browser/sync/profile_sync_service.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 9695b84..055f039 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -322,11 +322,6 @@ void ProfileSyncService::EnableForUser() {
}
void ProfileSyncService::DisableForUser() {
- if (WizardIsVisible()) {
- // TODO(timsteele): Focus wizard.
- return;
- }
-
LOG(INFO) << "Clearing Sync DB.";
// Clear prefs (including SyncSetupHasCompleted) before shutting down so
@@ -403,7 +398,7 @@ void ProfileSyncService::OnUnrecoverableError(
from_here.Write(true, true, &location);
LOG(ERROR) << location;
- if (WizardIsVisible()) {
+ if (SetupInProgress()) {
// We've hit an error in the middle of a startup process- shutdown all the
// backend stuff, and then restart it, so we're in the same state as before.
MessageLoop::current()->PostTask(FROM_HERE,
@@ -468,6 +463,13 @@ void ProfileSyncService::OnAuthError() {
FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged());
}
+void ProfileSyncService::OnStopSyncingPermanently() {
+ if (SetupInProgress())
+ wizard_.Step(SyncSetupWizard::FATAL_ERROR);
+
+ DisableForUser();
+}
+
void ProfileSyncService::ShowLoginDialog() {
if (WizardIsVisible()) {
wizard_.Focus();