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

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

Issue 3655004: Add UI for setting the encryption passphrase.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fixes 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/choose_datatypes.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 62207)
+++ chrome/browser/sync/profile_sync_service.cc (working copy)
@@ -646,7 +646,7 @@
return;
}
wizard_.SetParent(parent_window);
- wizard_.Step(SyncSetupWizard::CHOOSE_DATA_TYPES);
+ wizard_.Step(SyncSetupWizard::CONFIGURE);
}
SyncBackendHost::StatusSummary ProfileSyncService::QuerySyncStatusSummary() {
@@ -836,6 +836,15 @@
}
}
+bool ProfileSyncService::IsUsingSecondaryPassphrase() const {
+ return profile_->GetPrefs()->GetBoolean(prefs::kSyncUsingSecondaryPassphrase);
+}
+
+void ProfileSyncService::SetSecondaryPassphrase(const std::string& passphrase) {
+ SetPassphrase(passphrase);
+ profile_->GetPrefs()->SetBoolean(prefs::kSyncUsingSecondaryPassphrase, true);
+}
+
bool ProfileSyncService::IsCryptographerReady() const {
return backend_.get() && backend_->IsCryptographerReady();
}
@@ -931,9 +940,12 @@
break;
}
- // TODO(sync): Show the passphrase UI here.
- UpdateAuthErrorState(GoogleServiceAuthError(
- GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS));
+ if (SetupInProgress()) {
+ wizard_.Step(SyncSetupWizard::ENTER_PASSPHRASE);
+ } else {
+ UpdateAuthErrorState(GoogleServiceAuthError(
+ GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS));
+ }
break;
}
case NotificationType::SYNC_DATA_TYPES_UPDATED: {
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/browser/sync/resources/choose_datatypes.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698