diff options
author | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-23 18:51:04 +0000 |
---|---|---|
committer | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-23 18:51:04 +0000 |
commit | 71555646de41aa4512b132fb404149dfdb998675 (patch) | |
tree | 1f9756df785496845fcd3085b069157bc6ebc4bf /chrome | |
parent | 6556f27c4b7d7bd6e77a3c43c3f0518afbb770f9 (diff) | |
download | chromium_src-71555646de41aa4512b132fb404149dfdb998675.zip chromium_src-71555646de41aa4512b132fb404149dfdb998675.tar.gz chromium_src-71555646de41aa4512b132fb404149dfdb998675.tar.bz2 |
When enabling password sync manually, use the passphrase migration flow to create a passphrase, rather than the confusing "enter your existing passphrase" dialog.
BUG=73791
TEST=see bug
Review URL: http://codereview.chromium.org/6541088
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75769 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/sync/profile_sync_service.cc | 10 | ||||
-rw-r--r-- | chrome/browser/sync/sync_setup_flow.cc | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc index 2e44ff2..cefb143 100644 --- a/chrome/browser/sync/profile_sync_service.cc +++ b/chrome/browser/sync/profile_sync_service.cc @@ -729,8 +729,13 @@ void ProfileSyncService::OnPassphraseRequired(bool for_decryption) { return; } - if (WizardIsVisible()) { + if (WizardIsVisible() && for_decryption) { wizard_.Step(SyncSetupWizard::ENTER_PASSPHRASE); + } else if (WizardIsVisible() && !for_decryption) { + // The user is enabling an encrypted data type for the first + // time, and we don't even have a default passphrase. We need + // to refresh credentials and show the passphrase migration. + SigninForPassphraseMigration(NULL); } NotifyObservers(); @@ -762,6 +767,9 @@ void ProfileSyncService::ShowLoginDialog(gfx::NativeWindow parent_window) { if (WizardIsVisible()) { wizard_.Focus(); + // Force the wizard to step to the login screen (which will only actually + // happen if the transition is valid). + wizard_.Step(SyncSetupWizard::GAIA_LOGIN); return; } diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc index c5c2ec6..9fd3c6c 100644 --- a/chrome/browser/sync/sync_setup_flow.cc +++ b/chrome/browser/sync/sync_setup_flow.cc @@ -566,7 +566,8 @@ bool SyncSetupFlow::ShouldAdvance(SyncSetupWizard::State state) { switch (state) { case SyncSetupWizard::GAIA_LOGIN: return current_state_ == SyncSetupWizard::FATAL_ERROR || - current_state_ == SyncSetupWizard::GAIA_LOGIN; + current_state_ == SyncSetupWizard::GAIA_LOGIN || + current_state_ == SyncSetupWizard::SETTING_UP; case SyncSetupWizard::GAIA_SUCCESS: return current_state_ == SyncSetupWizard::GAIA_LOGIN; case SyncSetupWizard::CONFIGURE: |