Index: sync/internal_api/write_node.cc |
diff --git a/sync/internal_api/write_node.cc b/sync/internal_api/write_node.cc |
index 22d7e5f248b7d613813ffb51b6bd67837fad5c1b..c9d4755f1cfa6a3f2eb8e564a6c406f2050ceee3 100644 |
--- a/sync/internal_api/write_node.cc |
+++ b/sync/internal_api/write_node.cc |
@@ -42,10 +42,9 @@ void WriteNode::SetIsFolder(bool folder) { |
void WriteNode::SetTitle(const std::wstring& title) { |
DCHECK_NE(GetModelType(), UNSPECIFIED); |
ModelType type = GetModelType(); |
- Cryptographer* cryptographer = GetTransaction()->GetCryptographer(); |
// It's possible the nigori lost the set of encrypted types. If the current |
// specifics are already encrypted, we want to ensure we continue encrypting. |
- bool needs_encryption = cryptographer->GetEncryptedTypes().Has(type) || |
+ bool needs_encryption = GetTransaction()->GetEncryptedTypes().Has(type) || |
entry_->Get(SPECIFICS).has_encrypted(); |
// If this datatype is encrypted and is not a bookmark, we disregard the |
@@ -203,7 +202,6 @@ void WriteNode::SetEntitySpecifics( |
if (GetModelType() != UNSPECIFIED) { |
DCHECK_EQ(new_specifics_type, GetModelType()); |
} |
- Cryptographer* cryptographer = GetTransaction()->GetCryptographer(); |
// Preserve unknown fields. |
const sync_pb::EntitySpecifics& old_specifics = entry_->Get(SPECIFICS); |
@@ -213,7 +211,9 @@ void WriteNode::SetEntitySpecifics( |
old_specifics.unknown_fields()); |
// Will update the entry if encryption was necessary. |
- if (!UpdateEntryWithEncryption(cryptographer, new_specifics, entry_)) { |
+ if (!UpdateEntryWithEncryption(GetTransaction()->GetWrappedTrans(), |
+ new_specifics, |
+ entry_)) { |
return; |
} |
if (entry_->Get(SPECIFICS).has_encrypted()) { |