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

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: Rebase + fix allstatus Created 9 years, 4 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
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/sync_setup_flow.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..914dcd0ab0d9aaf18f2b845e5ea392e51864f378 100644
--- a/chrome/browser/sync/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/profile_sync_service_harness.cc
@@ -796,7 +796,16 @@ bool ProfileSyncServiceHarness::EnableEncryptionForType(
if (encrypted_types.count(type) > 0)
return true;
encrypted_types.insert(type);
- service_->EncryptDataTypes(encrypted_types);
+ service_->set_pending_types_for_encryption(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);
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/sync_setup_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698