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

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

Issue 6364009: From the enter-passphrase screen in sync setup, canceling should only disable... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
===================================================================
--- chrome/browser/sync/profile_sync_service.cc (revision 72509)
+++ chrome/browser/sync/profile_sync_service.cc (working copy)
@@ -431,6 +431,14 @@
backend_.reset(new SyncBackendHost(profile_));
}
+bool ProfileSyncService::IsEncryptedDatatypeEnabled() const {
+ // Currently on passwords are an encrypted datatype, so
+ // we check to see if it is enabled.
+ syncable::ModelTypeSet types;
+ GetPreferredDataTypes(&types);
+ return types.count(syncable::PASSWORDS) != 0;
+}
+
void ProfileSyncService::StartUp() {
// Don't start up multiple times.
if (backend_.get()) {
@@ -703,6 +711,15 @@
return;
}
+ // We will skip the passphrase prompt and suppress the warning
+ // if the passphrase is needed for decryption but the user is
+ // not syncing an encrypted data type on this machine.
+ // Otherwise we prompt.
+ if (!IsEncryptedDatatypeEnabled() && for_decryption) {
+ OnPassphraseAccepted();
+ return;
+ }
+
if (WizardIsVisible()) {
wizard_.Step(SyncSetupWizard::ENTER_PASSPHRASE);
}

Powered by Google App Engine
This is Rietveld 408576698