Chromium Code Reviews| Index: components/sync/core/write_node.cc |
| diff --git a/components/sync/core/write_node.cc b/components/sync/core/write_node.cc |
| index 0977234702cbce013978ddd190d8df1375a17d00..a8b77ea76ae1d31cb7bb4adad110f3272298b138 100644 |
| --- a/components/sync/core/write_node.cc |
| +++ b/components/sync/core/write_node.cc |
| @@ -11,6 +11,7 @@ |
| #include "base/values.h" |
| #include "components/sync/base/cryptographer.h" |
| #include "components/sync/core/base_transaction.h" |
| +#include "components/sync/core/password_metadata_filling.h" |
| #include "components/sync/core/write_transaction.h" |
| #include "components/sync/core_impl/syncapi_internal.h" |
| #include "components/sync/protocol/bookmark_specifics.pb.h" |
| @@ -136,6 +137,13 @@ void WriteNode::SetPasswordSpecifics( |
| } |
| sync_pb::PasswordSpecifics* password_specifics = |
| entity_specifics.mutable_password(); |
| + |
| + const std::string metadata_url(data.signon_realm()); |
| + if (!IsExplicitPassphrase(GetTransaction()->GetPassphraseType()) && |
| + base::FeatureList::IsEnabled(kPasswordsMetadataFilling) && |
| + password_specifics->unencrypted_metadata().url() != metadata_url) { |
| + password_specifics->mutable_unencrypted_metadata()->set_url(metadata_url); |
| + } |
|
Nicolas Zea
2016/09/23 23:10:37
nit: newline after
melandory
2016/10/04 10:13:12
Done.
|
| // This will only update password_specifics if the underlying unencrypted blob |
| // was different from |data| or was not encrypted with the proper passphrase. |
| if (!cryptographer->Encrypt(data, password_specifics->mutable_encrypted())) { |