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

Unified Diff: components/sync/syncable/syncable_id.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/syncable_id.h ('k') | components/sync/syncable/syncable_id_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/syncable/syncable_id.cc
diff --git a/components/sync/syncable/syncable_id.cc b/components/sync/syncable/syncable_id.cc
index 24d8dfdbde821416605a2006f3523e292456550e..14c7e58c8b9e3251d738cc36105aa4e571d42753 100644
--- a/components/sync/syncable/syncable_id.cc
+++ b/components/sync/syncable/syncable_id.cc
@@ -5,6 +5,7 @@
#include "components/sync/syncable/syncable_id.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/values.h"
using std::ostream;
@@ -18,8 +19,8 @@ ostream& operator<<(ostream& out, const Id& id) {
return out;
}
-base::Value* Id::ToValue() const {
- return new base::Value(s_);
+std::unique_ptr<base::Value> Id::ToValue() const {
+ return base::MakeUnique<base::Value>(s_);
}
string Id::GetServerId() const {
« no previous file with comments | « components/sync/syncable/syncable_id.h ('k') | components/sync/syncable/syncable_id_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698