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

Unified Diff: components/sync/device_info/device_info.cc

Issue 2287733002: Switch //components away from base::ListValue::Append(Value*) overload. (Closed)
Patch Set: rebase Created 4 years, 4 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
Index: components/sync/device_info/device_info.cc
diff --git a/components/sync/device_info/device_info.cc b/components/sync/device_info/device_info.cc
index f2c87336062737546b74371bb0efe204ab67ccaa..70c699c2a4ec976c197eaf0e0cd8d2cd5b882890 100644
--- a/components/sync/device_info/device_info.cc
+++ b/components/sync/device_info/device_info.cc
@@ -96,8 +96,8 @@ bool DeviceInfo::Equals(const DeviceInfo& other) const {
this->signin_scoped_device_id() == other.signin_scoped_device_id();
}
-base::DictionaryValue* DeviceInfo::ToValue() {
- base::DictionaryValue* value = new base::DictionaryValue();
+std::unique_ptr<base::DictionaryValue> DeviceInfo::ToValue() {
+ std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
value->SetString("name", client_name_);
value->SetString("id", public_id_);
value->SetString("os", GetOSString());

Powered by Google App Engine
This is Rietveld 408576698