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..db818f2e172e4dfd7291d4e663a73e2b65bffd07 100644 |
--- a/components/sync/core/write_node.cc |
+++ b/components/sync/core/write_node.cc |
@@ -117,8 +117,8 @@ void WriteNode::SetNigoriSpecifics(const sync_pb::NigoriSpecifics& new_value) { |
SetEntitySpecifics(entity_specifics); |
} |
-void WriteNode::SetPasswordSpecifics( |
- const sync_pb::PasswordSpecificsData& data) { |
+void WriteNode::SetPasswordSpecifics(const sync_pb::PasswordSpecificsData& data, |
+ PassphraseType passphrase_type) { |
DCHECK_EQ(GetModelType(), PASSWORDS); |
Cryptographer* cryptographer = GetTransaction()->GetCryptographer(); |
@@ -143,10 +143,15 @@ void WriteNode::SetPasswordSpecifics( |
<< "corruption"; |
return; |
} |
- SetEntitySpecifics(entity_specifics); |
+ SetEntitySpecifics(entity_specifics, passphrase_type); |
} |
void WriteNode::SetEntitySpecifics(const sync_pb::EntitySpecifics& new_value) { |
+ SetEntitySpecifics(new_value, PassphraseType::UNDEFINED); |
+} |
+ |
+void WriteNode::SetEntitySpecifics(const sync_pb::EntitySpecifics& new_value, |
+ PassphraseType passphrase_type) { |
ModelType new_specifics_type = GetModelTypeFromSpecifics(new_value); |
CHECK(!new_value.password().has_client_only_encrypted_data()); |
DCHECK_NE(new_specifics_type, UNSPECIFIED); |
@@ -163,7 +168,7 @@ void WriteNode::SetEntitySpecifics(const sync_pb::EntitySpecifics& new_value) { |
// Will update the entry if encryption was necessary. |
if (!UpdateEntryWithEncryption(GetTransaction()->GetWrappedTrans(), |
Nicolas Zea
2016/08/26 18:28:30
Given you have access to the transaction now, I do
melandory
2016/08/26 23:16:59
Oh, definitelly!
Fixed and updated CL https://cod
|
- new_specifics, entry_)) { |
+ new_specifics, entry_, passphrase_type)) { |
return; |
} |
if (entry_->GetSpecifics().has_encrypted()) { |