Index: components/sync/core_impl/sync_encryption_handler_impl.cc |
diff --git a/components/sync/core_impl/sync_encryption_handler_impl.cc b/components/sync/core_impl/sync_encryption_handler_impl.cc |
index 686abbb45c4fddadeaa1e601fc0682f5b82497da..f5f64cd94ee5b8576735be1550d30729f367fd9f 100644 |
--- a/components/sync/core_impl/sync_encryption_handler_impl.cc |
+++ b/components/sync/core_impl/sync_encryption_handler_impl.cc |
@@ -195,6 +195,14 @@ bool UnpackKeystoreBootstrapToken(const std::string& keystore_bootstrap_token, |
return true; |
} |
+// If the user starts using custom passphrase, then unencrypted metadata fields |
+// for the password entity should be cleared. |
+sync_pb::PasswordSpecificsMetadata |
+ProcessPasswordSpecificMetadataForExplicitPassphareUsers( |
+ const sync_pb::PasswordSpecificsMetadata& password_metadata) { |
+ return sync_pb::PasswordSpecificsMetadata(); |
+} |
+ |
} // namespace |
SyncEncryptionHandlerImpl::Vault::Vault(Encryptor* encryptor, |
@@ -842,6 +850,11 @@ void SyncEncryptionHandlerImpl::ReEncryptEverything(WriteTransaction* trans) { |
if (child.InitByIdLookup(child_id) != BaseNode::INIT_OK) |
break; // Possible if we failed to decrypt the data for some reason. |
child.SetPasswordSpecifics(child.GetPasswordSpecifics()); |
+ if (IsExplicitPassphrase(passphrase_type_)) { |
+ child.SetPasswordSpecificsMetadata( |
Nicolas Zea
2016/08/20 00:23:43
It occurs to me that I don't think you need this.
melandory
2016/08/22 22:08:41
Disclaimer. Text below is written with an assumpti
|
+ ProcessPasswordSpecificMetadataForExplicitPassphareUsers( |
+ child.GetPasswordSpecificsMetadata())); |
+ } |
child_id = child.GetSuccessorId(); |
} |
} |