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

Unified Diff: chrome/browser/sync/internal_api/sync_manager.h

Issue 8356026: [Sync] Cache encrypted types info in ProfileSyncService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert to synchronous notifications Created 9 years, 2 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/internal_api/sync_manager.h
diff --git a/chrome/browser/sync/internal_api/sync_manager.h b/chrome/browser/sync/internal_api/sync_manager.h
index 650893d2aba22d7f89deeae55187d8fcfc10fdc7..0dd84e6464266a1d65940388c6afd35d70f8c787 100644
--- a/chrome/browser/sync/internal_api/sync_manager.h
+++ b/chrome/browser/sync/internal_api/sync_manager.h
@@ -376,9 +376,17 @@ class SyncManager {
virtual void OnClearServerDataSucceeded() = 0;
virtual void OnClearServerDataFailed() = 0;
+ // Called when the set of encrypted types changes. Called from
+ // within a transaction.
+ virtual void OnEncryptedTypesChanged(
+ const syncable::ModelTypeSet& encrypted_types,
+ bool encrypt_everything) = 0;
+
// Called after we finish encrypting all appropriate datatypes.
- virtual void OnEncryptionComplete(
- const syncable::ModelTypeSet& encrypted_types) = 0;
+ // Always preceded by a call to OnEncryptedTypesChanged with the
+ // latest set of encrypted types. Called from within a
+ // transaction.
+ virtual void OnEncryptionComplete() = 0;
virtual void OnActionableError(
const browser_sync::SyncProtocolError& sync_protocol_error) = 0;
@@ -535,11 +543,11 @@ class SyncManager {
// Returns true if we are currently encrypting all sync data. May
// be called on any thread.
- bool EncryptEverythingEnabled() const;
+ bool EncryptEverythingEnabledForTest() const;
// Gets the set of encrypted types from the cryptographer
// Note: opens a transaction. May be called from any thread.
- syncable::ModelTypeSet GetEncryptedDataTypes() const;
+ syncable::ModelTypeSet GetEncryptedDataTypesForTest() const;
// Reads the nigori node to determine if any experimental types should be
// enabled.

Powered by Google App Engine
This is Rietveld 408576698