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

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

Issue 7466024: [Sync] Support receiving early passphrase required information in Sync UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed + fix unit test Created 9 years, 5 months 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
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/sync_setup_wizard_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/sync_setup_flow.cc
diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc
index b6239765ee568534256299c304739e1d0d2e5477..fbcdb63b725e0928ada510f48aa934fccf6c42eb 100644
--- a/chrome/browser/sync/sync_setup_flow.cc
+++ b/chrome/browser/sync/sync_setup_flow.cc
@@ -267,10 +267,14 @@ void SyncSetupFlow::OnUserConfigured(const SyncConfiguration& configuration) {
!configuration.use_secondary_passphrase ||
configuration.secondary_passphrase.length() > 0);
- if (configuration.use_secondary_passphrase &&
- !service_->IsUsingSecondaryPassphrase()) {
- service_->SetPassphrase(configuration.secondary_passphrase, true, true);
- tried_creating_explicit_passphrase_ = true;
+ if (configuration.use_secondary_passphrase) {
+ if (!service_->IsUsingSecondaryPassphrase()) {
+ service_->SetPassphrase(configuration.secondary_passphrase, true, true);
+ tried_creating_explicit_passphrase_ = true;
+ } else {
+ service_->SetPassphrase(configuration.secondary_passphrase, true, false);
+ tried_setting_explicit_passphrase_ = true;
+ }
}
service_->OnUserChoseDatatypes(configuration.sync_everything,
@@ -326,8 +330,7 @@ bool SyncSetupFlow::ShouldAdvance(SyncSetupWizard::State state) {
current_state_ == SyncSetupWizard::CONFIGURE ||
current_state_ == SyncSetupWizard::SETTING_UP;
case SyncSetupWizard::SETUP_ABORTED_BY_PENDING_CLEAR:
- return (current_state_ != SyncSetupWizard::GAIA_LOGIN &&
- current_state_ != SyncSetupWizard::GAIA_SUCCESS);
+ return true; // The server can abort whenever it wants.
case SyncSetupWizard::SETTING_UP:
return current_state_ == SyncSetupWizard::SYNC_EVERYTHING ||
current_state_ == SyncSetupWizard::CONFIGURE ||
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/sync_setup_wizard_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698