Index: chrome/browser/sync/sync_setup_flow.cc |
diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc |
index 8230ce96c11912a24bd9a7cb17de81e3ea2e3c16..7ed631116ceedd002243af460fe6086d33c8b3e6 100644 |
--- a/chrome/browser/sync/sync_setup_flow.cc |
+++ b/chrome/browser/sync/sync_setup_flow.cc |
@@ -262,10 +262,16 @@ void SyncSetupFlow::OnUserConfigured(const SyncConfiguration& configuration) { |
// Go to the "loading..." screen. |
Advance(SyncSetupWizard::SETTING_UP); |
+ // Note: encryption calls must be made before OnUserChoseDatatypes. |
if (configuration.encrypt_all) { |
syncable::ModelTypeSet data_types; |
service_->GetRegisteredDataTypes(&data_types); |
service_->EncryptDataTypes(data_types); |
+ } else { |
+ // Necessary in case we had attempted to encrypt datatypes previously |
+ // but were unable to complete and the user wants to cancel out (for |
+ // example due to needing a passphrase). |
tim (not reviewing)
2011/08/04 16:57:56
hmm.. this seems odd.. but if we must can we pull
Nicolas Zea
2011/08/04 18:43:54
Done.
|
+ service_->EncryptDataTypes(syncable::ModelTypeSet()); |
} |
// If we are activating the passphrase, we need to have one supplied. |