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

Unified Diff: chrome/browser/sync/profile_sync_service_harness.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/profile_sync_service_harness.cc
diff --git a/chrome/browser/sync/profile_sync_service_harness.cc b/chrome/browser/sync/profile_sync_service_harness.cc
index d2fb640cb77d0fde11ff636d7c3f41ad9ec997c6..3127ca6fc75074f5e4e696aa685826f9d2fe4423 100644
--- a/chrome/browser/sync/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/profile_sync_service_harness.cc
@@ -798,6 +798,15 @@ bool ProfileSyncServiceHarness::EnableEncryptionForType(
encrypted_types.insert(type);
service_->EncryptDataTypes(encrypted_types);
+ // In order to kick off the encryption we have to reconfigure. Just grab the
+ // currently synced types and use them.
+ syncable::ModelTypeSet synced_datatypes;
+ service_->GetPreferredDataTypes(&synced_datatypes);
+ bool sync_everything = (synced_datatypes.size() ==
+ (syncable::MODEL_TYPE_COUNT - syncable::FIRST_REAL_MODEL_TYPE));
+ service_->OnUserChoseDatatypes(sync_everything,
+ synced_datatypes);
+
// Wait some time to let the enryption finish.
return WaitForTypeEncryption(type);
}

Powered by Google App Engine
This is Rietveld 408576698