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

Unified Diff: sync/util/cryptographer.h

Issue 10455012: [Sync] Add support for performing a GetKey on startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fred's comments Created 8 years, 5 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/util/cryptographer.h
diff --git a/sync/util/cryptographer.h b/sync/util/cryptographer.h
index f02875a41e69fdbcc5fbc22a8ce4a1d747309f9e..d66402037d1ce84d942e0ff49798258a2df6f29c 100644
--- a/sync/util/cryptographer.h
+++ b/sync/util/cryptographer.h
@@ -179,6 +179,15 @@ class Cryptographer {
// stored in the |pending_keys_|.
UpdateResult Update(const sync_pb::NigoriSpecifics& nigori);
+ // Set the keystore-derived nigori from the provided key.
+ // Returns true if we succesfully create the keystore derived nigori from the
+ // provided key, false otherwise.
+ bool SetKeystoreKey(const std::string& keystore_key);
+
+ // Returns true if we currently have a keystore-derived nigori, false
+ // otherwise.
+ bool HasKeystoreKey();
+
// The set of types that are always encrypted.
static ModelTypeSet SensitiveTypes();
@@ -237,6 +246,7 @@ class Cryptographer {
NigoriMap nigoris_; // The Nigoris we know about, mapped by key name.
NigoriMap::value_type* default_nigori_; // The Nigori used for encryption.
+ NigoriMap::value_type* keystore_nigori_; // Nigori generated from keystore.
scoped_ptr<sync_pb::EncryptedData> pending_keys_;

Powered by Google App Engine
This is Rietveld 408576698