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

Unified Diff: chrome/browser/sync/profile_sync_service.h

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/engine/syncapi_unittest.cc ('k') | chrome/browser/sync/profile_sync_service.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.h
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index b24503b66226e5b35fcba9cf5828a4789bda0043..f94faa598b7f5c3a1b4dcf3176c1e3a53a2e32aa 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -446,13 +446,12 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
bool is_explicit,
bool is_creation);
- // Changes the set of datatypes that require encryption. This affects all
- // machines synced to this account and all data belonging to the specified
- // types.
- // Note that this is an asynchronous operation (the encryption of data is
- // performed on SyncBackendHost's core thread) and may not have an immediate
- // effect.
- virtual void EncryptDataTypes(
+ // Sets the set of datatypes that are waiting for encryption
+ // (pending_types_for_encryption_).
+ // Note that this does not trigger the actual encryption. The encryption call
+ // is kicked off automatically the next time the datatype manager is
+ // reconfigured.
+ virtual void set_pending_types_for_encryption(
const syncable::ModelTypeSet& encrypted_types);
// Get the currently encrypted data types.
@@ -461,6 +460,9 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
virtual void GetEncryptedDataTypes(
syncable::ModelTypeSet* encrypted_types) const;
+ // Returns true if the syncer is waiting for new datatypes to be encrypted.
+ virtual bool HasPendingEncryptedTypes() const;
+
// Returns whether processing changes is allowed. Check this before doing
// any model-modifying operations.
bool ShouldPushChanges();
@@ -636,9 +638,8 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
base::OneShotTimer<ProfileSyncService> clear_server_data_timer_;
// The most recently requested set of types to encrypt. Set by the user,
- // and cached if the syncer was unable to encrypt new types (for example
- // because we haven't finished initializing). Cleared when we successfully
- // post a new encrypt task to the sync backend.
+ // and cached until the syncer either finishes encryption
+ // (OnEncryptionComplete) or the user cancels.
syncable::ModelTypeSet pending_types_for_encryption_;
scoped_ptr<browser_sync::BackendMigrator> migrator_;
« no previous file with comments | « chrome/browser/sync/engine/syncapi_unittest.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698