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

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: Rebase 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 b6f99af78c1565ec70cc189ce4989bc1fff5dada..869d941d192853cb3a2964630f71c00cf8779f49 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 syncer::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