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_; |