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

Unified Diff: sync/internal_api/sync_encryption_handler_impl.h

Issue 10878015: [Sync] Move keystore key handling to SyncEncryptionHandlerImpl (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 8f3b7acb344a4c0e500e79041b5d90b52a0dca0a..1b0b6489c11dad281cb5ea7bf24c408dca14eaa4 100644
--- a/sync/internal_api/sync_encryption_handler_impl.h
+++ b/sync/internal_api/sync_encryption_handler_impl.h
@@ -44,8 +44,11 @@ class SyncEncryptionHandlerImpl
: public SyncEncryptionHandler,
public syncable::NigoriHandler {
public:
- SyncEncryptionHandlerImpl(UserShare* user_share,
- Encryptor* encryptor);
+ SyncEncryptionHandlerImpl(
+ UserShare* user_share,
+ Encryptor* encryptor,
+ const std::string& restored_key_for_bootstrapping,
+ const std::string& restored_keystore_key_for_bootstrapping);
virtual ~SyncEncryptionHandlerImpl();
// SyncEncryptionHandler implementation.
@@ -67,6 +70,11 @@ class SyncEncryptionHandlerImpl
virtual void UpdateNigoriFromEncryptedTypes(
sync_pb::NigoriSpecifics* nigori,
syncable::BaseTransaction* const trans) const OVERRIDE;
+ virtual bool NeedKeystoreKey(
+ syncable::BaseTransaction* const trans) const OVERRIDE;
+ virtual bool SetKeystoreKey(
+ const std::string& key,
+ syncable::BaseTransaction* const trans) OVERRIDE;
// Can be called from any thread.
virtual ModelTypeSet GetEncryptedTypes(
syncable::BaseTransaction* const trans) const OVERRIDE;
@@ -182,6 +190,9 @@ class SyncEncryptionHandlerImpl
// keys stored in the nigori node.
PassphraseState passphrase_state_;
+ // The keystore key provided by the server.
+ std::string keystore_key_;
+
// The number of times we've automatically (i.e. not via SetPassphrase or
// conflict resolver) updated the nigori's encryption keys in this chrome
// instantiation.
« 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