diff options
author | lipalani@chromium.org <lipalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-12 10:42:50 +0000 |
---|---|---|
committer | lipalani@chromium.org <lipalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-12 10:42:50 +0000 |
commit | f8779165f7f6e0995abdda73d1f42470e9e7fd55 (patch) | |
tree | 9d4cc5a4fac4ce1929f6e4ca50e761a9b58bd1eb | |
parent | f7eb0a394522b0c3d6e9c16b54072e0bbafa0957 (diff) | |
download | chromium_src-f8779165f7f6e0995abdda73d1f42470e9e7fd55.zip chromium_src-f8779165f7f6e0995abdda73d1f42470e9e7fd55.tar.gz chromium_src-f8779165f7f6e0995abdda73d1f42470e9e7fd55.tar.bz2 |
With out this fix if there is an unrecoverable error then the code would assert(which the user would not see if using retail builds) and the dialog would be spinning for ever. With this fix we actually persist the change and dismiss the dialog. This is useful if the user is facing a recurring unrecoverable error due to a datatype and wishes to disable that.
BUG=87691
TEST=
Review URL: http://codereview.chromium.org/7329042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92139 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/sync/profile_sync_service.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc index 2debdea..da1b252 100644 --- a/chrome/browser/sync/profile_sync_service.cc +++ b/chrome/browser/sync/profile_sync_service.cc @@ -960,7 +960,8 @@ void ProfileSyncService::OnUserSubmittedAuth( void ProfileSyncService::OnUserChoseDatatypes(bool sync_everything, const syncable::ModelTypeSet& chosen_types) { - if (!backend_.get()) { + if (!backend_.get() && + unrecoverable_error_detected_ == false) { NOTREACHED(); return; } @@ -1019,7 +1020,21 @@ void ProfileSyncService::ChangePreferredDataTypes( // If we haven't initialized yet, don't configure the DTM as it could cause // association to start before a Directory has even been created. if (backend_initialized_) { + DCHECK(backend_.get()); ConfigureDataTypeManager(); + } else if (unrecoverable_error_detected()) { + // TODO(tim): crbug.com/87575 . We should have per data type unrecoverable + // errors. + + // Close the wizard. + if (WizardIsVisible()) { + wizard_.Step(SyncSetupWizard::DONE); + } + // There is nothing more to configure. So inform the listeners, + NotifyObservers(); + + VLOG(1) << "ConfigureDataTypeManager not invoked because of an " + << "Unrecoverable error."; } else { VLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " << "initialized"; |