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); |
} |