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

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: Rebase 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
« no previous file with comments | « no previous file | chrome/browser/sync/glue/sync_backend_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3a42a6a6260aba40150ca1b368ebd267be10a69f..6e616b63fef66ef71469cd40f5363c1412adc3ac 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698