| 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..bcc1e9b00f8dbd1fc53e1a36589c231c19291ef4 100644
|
| --- a/chrome/browser/sync/sync_setup_flow.cc
|
| +++ b/chrome/browser/sync/sync_setup_flow.cc
|
| @@ -262,10 +262,17 @@ void SyncSetupFlow::OnUserConfigured(const SyncConfiguration& configuration) {
|
| // Go to the "loading..." screen.
|
| Advance(SyncSetupWizard::SETTING_UP);
|
|
|
| + // Note: encryption calls must be made before OnUserChoseDatatypes.
|
| + // TODO(zea): Fix this.
|
| 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).
|
| + service_->EncryptDataTypes(syncable::ModelTypeSet());
|
| }
|
|
|
| // If we are activating the passphrase, we need to have one supplied.
|
|
|