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

Unified Diff: chrome/browser/sync/glue/sync_backend_host.h

Issue 10824410: [Sync] Refactor passphrase state handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix last test Created 8 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
Index: chrome/browser/sync/glue/sync_backend_host.h
diff --git a/chrome/browser/sync/glue/sync_backend_host.h b/chrome/browser/sync/glue/sync_backend_host.h
index 65aaa0454066ab273cf494b3592433e0da40f3c4..0786a6c2aee664c9930135e1490319c512e0a2d4 100644
--- a/chrome/browser/sync/glue/sync_backend_host.h
+++ b/chrome/browser/sync/glue/sync_backend_host.h
@@ -454,6 +454,11 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// Invoked when sync finishes encrypting new datatypes.
void NotifyEncryptionComplete();
+ // Invoked when the passphrase state has changed. Caches the passphrase state
+ // for later use on the UI thread.
+ void HandlePassphraseStateChangedOnFrontendLoop(
+ syncer::PassphraseState state);
+
void HandleStopSyncingPermanentlyOnFrontendLoop();
// Dispatched to from OnConnectionStatusChange to handle updating
@@ -522,6 +527,12 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// were cached.
sync_pb::EncryptedData cached_pending_keys_;
+ // The state of the passphrase required to decrypt the bag of encryption keys
+ // in the nigori node. Updated whenever a new nigori node arrives or the user
+ // manually changes their passphrase state. Cached so we can synchronously
+ // check it from the UI thread.
+ syncer::PassphraseState cached_passphrase_state_;
+
// UI-thread cache of the last SyncSessionSnapshot received from syncapi.
syncer::sessions::SyncSessionSnapshot last_snapshot_;
« no previous file with comments | « no previous file | chrome/browser/sync/glue/sync_backend_host.cc » ('j') | sync/internal_api/public/sync_encryption_handler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698