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

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

Issue 2889163002: Remove raw DictionaryValue::Set in //components (Closed)
Patch Set: Nits Created 3 years, 7 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/syncable/write_transaction_info.h ('k') | components/sync/test/fake_server/fake_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/syncable/write_transaction_info.cc
diff --git a/components/sync/syncable/write_transaction_info.cc b/components/sync/syncable/write_transaction_info.cc
index 0c4ac293010ac87b0b685accbe4edeb222f851e4..69e4f4f38d91443d42f089a68f1bfb0bf2f4a679 100644
--- a/components/sync/syncable/write_transaction_info.cc
+++ b/components/sync/syncable/write_transaction_info.cc
@@ -30,9 +30,9 @@ WriteTransactionInfo::WriteTransactionInfo(const WriteTransactionInfo& other) =
WriteTransactionInfo::~WriteTransactionInfo() {}
-base::DictionaryValue* WriteTransactionInfo::ToValue(
+std::unique_ptr<base::DictionaryValue> WriteTransactionInfo::ToValue(
size_t max_mutations_size) const {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ auto dict = base::MakeUnique<base::DictionaryValue>();
dict->SetString("id", base::Int64ToString(id));
dict->SetString("location", location_string);
dict->SetString("writer", WriterTagToString(writer));
« no previous file with comments | « components/sync/syncable/write_transaction_info.h ('k') | components/sync/test/fake_server/fake_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698