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

Unified Diff: sync/internal_api/sync_encryption_handler_impl.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
Index: sync/internal_api/sync_encryption_handler_impl.h
diff --git a/sync/internal_api/sync_encryption_handler_impl.h b/sync/internal_api/sync_encryption_handler_impl.h
index 8966da751c9f2855c30e876ceb88546bae93607a..8f3b7acb344a4c0e500e79041b5d90b52a0dca0a 100644
--- a/sync/internal_api/sync_encryption_handler_impl.h
+++ b/sync/internal_api/sync_encryption_handler_impl.h
@@ -57,9 +57,7 @@ class SyncEncryptionHandlerImpl
virtual void SetDecryptionPassphrase(const std::string& passphrase) OVERRIDE;
virtual void EnableEncryptEverything() OVERRIDE;
virtual bool EncryptEverythingEnabled() const OVERRIDE;
- // Can be called from any thread.
- // TODO(zea): enforce this is only called on sync thread.
- virtual bool IsUsingExplicitPassphrase() const OVERRIDE;
+ virtual PassphraseState GetPassphraseState() const OVERRIDE;
// NigoriHandler implementation.
// Note: all methods are invoked while the caller holds a transaction.
@@ -180,8 +178,9 @@ class SyncEncryptionHandlerImpl
// thread.
// Whether all current and future types should be encrypted.
bool encrypt_everything_;
- // Whether the user is using a custom passphrase for encryption.
- bool explicit_passphrase_;
+ // The current state of the passphrase required to decrypt the encryption
+ // keys stored in the nigori node.
+ PassphraseState passphrase_state_;
// The number of times we've automatically (i.e. not via SetPassphrase or
// conflict resolver) updated the nigori's encryption keys in this chrome
« no previous file with comments | « sync/internal_api/public/util/sync_string_conversions.cc ('k') | sync/internal_api/sync_encryption_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698