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

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

Issue 7551024: [Sync] Fix encryption/passphrase handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix integration tests Created 9 years, 5 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/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.

Powered by Google App Engine
This is Rietveld 408576698