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

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

Issue 6902101: Refactor sync passphrase setup flow and fix passphrase tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test. Created 9 years, 8 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
Index: chrome/browser/sync/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index d6347d85b9ffdac614afb43f20dda792dd20f129..6fb561c9b8b0dcbb94657a3767f85d3f92828800 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -69,6 +69,7 @@ ProfileSyncService::ProfileSyncService(ProfileSyncFactory* factory,
const std::string& cros_user)
: last_auth_error_(AuthError::None()),
observed_passphrase_required_(false),
+ observed_passphrase_failed_(false),
passphrase_required_for_decryption_(false),
passphrase_migration_in_progress_(false),
factory_(factory),
@@ -634,9 +635,13 @@ void ProfileSyncService::OnPassphraseAccepted() {
// this time.
syncable::ModelTypeSet types;
GetPreferredDataTypes(&types);
- // Reset "passphrase_required" flag before configuring the DataTypeManager
- // since we know we no longer require the passphrase.
+
+ // Reset "passphrase_required" and "passphrase_failed" flags before
+ // configuring the DataTypeManager since we know we no longer require the
+ // passphrase.
observed_passphrase_required_ = false;
+ observed_passphrase_failed_ = false;
+
if (data_type_manager_.get())
data_type_manager_->Configure(types);
@@ -645,6 +650,11 @@ void ProfileSyncService::OnPassphraseAccepted() {
wizard_.Step(SyncSetupWizard::DONE);
}
+void ProfileSyncService::OnPassphraseFailed() {
+ observed_passphrase_failed_ = true;
+ OnPassphraseRequired(true);
tim (not reviewing) 2011/04/28 17:18:00 This seems like a step in the wrong direction. We
Raghu Simha 2011/04/28 17:44:21 Like I explained in the other comment, this is to
+}
+
void ProfileSyncService::OnEncryptionComplete(
const syncable::ModelTypeSet& encrypted_types) {
if (encrypted_types_ != encrypted_types) {

Powered by Google App Engine
This is Rietveld 408576698