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

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

Issue 6465005: [Sync] Initial support for encrypting any datatype (no UI hookup yet). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Rest of unit tests. Created 9 years, 10 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.h
diff --git a/chrome/browser/sync/profile_sync_service_harness.h b/chrome/browser/sync/profile_sync_service_harness.h
index ddbfbe22f85dbfe6e0093289fa213078819d352f..18839c204479245391d9b69994047bbcd7e6c8dd 100644
--- a/chrome/browser/sync/profile_sync_service_harness.h
+++ b/chrome/browser/sync/profile_sync_service_harness.h
@@ -114,6 +114,14 @@ class ProfileSyncServiceHarness : public ProfileSyncServiceObserver {
// Returns a snapshot of the current sync session.
const SyncSessionSnapshot* GetLastSessionSnapshot() const;
+ // Encrypt the datatype |type|. This method will block while the sync backend
+ // host performs the encryption or a timeout is reached. Returns false if
+ // encryption failed, else true.
+ bool EnableEncryptionForType(syncable::ModelType type);
+
+ // Check if |type| is encrypted.
+ bool IsTypeEncrypted(syncable::ModelType type);
+
private:
friend class StateChangeTimeoutEvent;
@@ -139,6 +147,9 @@ class ProfileSyncServiceHarness : public ProfileSyncServiceObserver {
// The sync client anticipates incoming updates leading to a new sync cycle.
WAITING_FOR_UPDATES,
+ // The sync client anticipates encryption of new datatypes.
+ WAITING_FOR_ENCRYPTION,
+
// The sync client cannot reach the server.
SERVER_UNREACHABLE,

Powered by Google App Engine
This is Rietveld 408576698