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

Unified Diff: components/sync/syncable/nigori_util.cc

Issue 2278333002: Supplimentary identifier for passwords specific (Closed)
Patch Set: Supplimentary identifier for passwords specific. Created 4 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 | « components/sync/protocol/proto_value_conversions.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/syncable/nigori_util.cc
diff --git a/components/sync/syncable/nigori_util.cc b/components/sync/syncable/nigori_util.cc
index 96e687d0351dc7f0a63e8264fce11454ada10d58..791b518fcac0cc59c94960d235feb55e92fe09e3 100644
--- a/components/sync/syncable/nigori_util.cc
+++ b/components/sync/syncable/nigori_util.cc
@@ -13,6 +13,7 @@
#include "base/json/json_writer.h"
#include "components/sync/base/cryptographer.h"
+#include "components/sync/base/passphrase_type.h"
#include "components/sync/syncable/directory.h"
#include "components/sync/syncable/entry.h"
#include "components/sync/syncable/mutable_entry.h"
@@ -225,6 +226,14 @@ bool UpdateEntryWithEncryption(BaseTransaction* const trans,
bookmark_specifics->set_title(kEncryptedString);
}
}
+
+ if (type == PASSWORDS &&
+ IsExplicitPassphrase(nigori_handler->GetPassphraseType(trans))) {
+ sync_pb::PasswordSpecifics* password_specifics =
+ generated_specifics.mutable_password();
+ password_specifics->clear_unencrypted_metadata();
+ }
+
entry->PutSpecifics(generated_specifics);
DVLOG(1) << "Overwriting specifics of type " << ModelTypeToString(type)
<< " and marking for syncing.";
« no previous file with comments | « components/sync/protocol/proto_value_conversions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698