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

Unified Diff: components/sync/syncable/entry.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/entry.h ('k') | components/sync/syncable/entry_kernel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/syncable/entry.cc
diff --git a/components/sync/syncable/entry.cc b/components/sync/syncable/entry.cc
index cd1a78f78e5d6c39aa2a8dfc2e43f4154f182ed6..8b36c5d3e0d9564227ad4b6ad70c74e4f5d311c1 100644
--- a/components/sync/syncable/entry.cc
+++ b/components/sync/syncable/entry.cc
@@ -6,6 +6,8 @@
#include <iomanip>
+#include "base/memory/ptr_util.h"
+#include "base/values.h"
#include "components/sync/syncable/directory.h"
#include "components/sync/syncable/syncable_base_transaction.h"
@@ -42,8 +44,9 @@ Directory* Entry::dir() const {
return basetrans_->directory();
}
-base::DictionaryValue* Entry::ToValue(Cryptographer* cryptographer) const {
- base::DictionaryValue* entry_info = new base::DictionaryValue();
+std::unique_ptr<base::DictionaryValue> Entry::ToValue(
+ Cryptographer* cryptographer) const {
+ auto entry_info = base::MakeUnique<base::DictionaryValue>();
entry_info->SetBoolean("good", good());
if (good()) {
entry_info->Set("kernel", kernel_->ToValue(cryptographer));
« no previous file with comments | « components/sync/syncable/entry.h ('k') | components/sync/syncable/entry_kernel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698