diff options
author | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-24 03:28:34 +0000 |
---|---|---|
committer | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-24 03:28:34 +0000 |
commit | 7d1736df46ee4d893e00216f7066f7d1ae1ddd94 (patch) | |
tree | 359baf03491e0ce9127f9965c9f6a73b368455d7 | |
parent | 3c59dcbb21217821a045e0a62f6415e68d6a2e26 (diff) | |
download | chromium_src-7d1736df46ee4d893e00216f7066f7d1ae1ddd94.zip chromium_src-7d1736df46ee4d893e00216f7066f7d1ae1ddd94.tar.gz chromium_src-7d1736df46ee4d893e00216f7066f7d1ae1ddd94.tar.bz2 |
Merge 75769 - 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
TBR=johnnyg@chromium.org
Review URL: http://codereview.chromium.org/6581023
git-svn-id: svn://svn.chromium.org/chrome/branches/648/src@75849 0039d316-1c4b-4281-b951-d872f2087c98
-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 d41dd86..5ead0b2 100644 --- a/chrome/browser/sync/profile_sync_service.cc +++ b/chrome/browser/sync/profile_sync_service.cc @@ -700,8 +700,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(); @@ -733,6 +738,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 405cccb..b9a64b8 100644 --- a/chrome/browser/sync/sync_setup_flow.cc +++ b/chrome/browser/sync/sync_setup_flow.cc @@ -547,7 +547,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: |