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

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

Issue 3792007: Fix some problems with the ENTER_PASSPHRASE state in sync setup.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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.h ('k') | chrome/browser/sync/resources/passphrase.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service.cc
===================================================================
--- chrome/browser/sync/profile_sync_service.cc (revision 62569)
+++ chrome/browser/sync/profile_sync_service.cc (working copy)
@@ -62,6 +62,7 @@
Profile* profile,
const std::string& cros_user)
: last_auth_error_(AuthError::None()),
+ observed_passphrase_required_(false),
factory_(factory),
profile_(profile),
cros_user_(cros_user),
@@ -72,7 +73,7 @@
unrecoverable_error_detected_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(scoped_runnable_method_factory_(this)),
token_migrator_(NULL),
- observed_passphrase_required_(false),
+
clear_server_data_state_(CLEAR_NOT_STARTED) {
DCHECK(factory);
DCHECK(profile);
@@ -564,7 +565,7 @@
if (!cros_user_.empty()) {
if (profile_->GetPrefs()->GetBoolean(prefs::kSyncSuppressStart)) {
- ShowChooseDataTypes(NULL);
+ ShowConfigure(NULL);
} else {
SetSyncSetupCompleted();
}
@@ -668,12 +669,16 @@
}
wizard_.SetParent(parent_window);
- wizard_.Step(SyncSetupWizard::GAIA_LOGIN);
+ // This method will also be called if a passphrase is needed.
+ if (observed_passphrase_required_)
+ wizard_.Step(SyncSetupWizard::ENTER_PASSPHRASE);
+ else
+ wizard_.Step(SyncSetupWizard::GAIA_LOGIN);
FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged());
}
-void ProfileSyncService::ShowChooseDataTypes(gfx::NativeWindow parent_window) {
+void ProfileSyncService::ShowConfigure(gfx::NativeWindow parent_window) {
if (WizardIsVisible()) {
wizard_.Focus();
return;
@@ -957,7 +962,8 @@
}
// TODO(sync): Less wizard, more toast.
- wizard_.Step(SyncSetupWizard::DONE);
+ if (!observed_passphrase_required_)
+ wizard_.Step(SyncSetupWizard::DONE);
FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged());
break;
@@ -997,6 +1003,8 @@
data_type_manager_->Configure(types);
FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged());
+ observed_passphrase_required_ = false;
+ wizard_.Step(SyncSetupWizard::DONE);
break;
}
case NotificationType::PREF_CHANGED: {
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/browser/sync/resources/passphrase.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698