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

Unified Diff: google_apis/drive/drive_api_requests.cc

Issue 2285933003: Remove more usage of the 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
« no previous file with comments | « device/geolocation/network_location_request.cc ('k') | printing/print_settings_conversion.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/drive/drive_api_requests.cc
diff --git a/google_apis/drive/drive_api_requests.cc b/google_apis/drive/drive_api_requests.cc
index fc207787d2bd9ff7e5cd4faaf0bdc467f2e87a97..902623a2fc43b7ee026ee82c04daa505dea947d6 100644
--- a/google_apis/drive/drive_api_requests.cc
+++ b/google_apis/drive/drive_api_requests.cc
@@ -92,7 +92,8 @@ void AttachProperties(const Properties& properties,
base::ListValue* const properties_value = new base::ListValue;
for (const auto& property : properties) {
- base::DictionaryValue* const property_value = new base::DictionaryValue;
+ std::unique_ptr<base::DictionaryValue> property_value(
+ new base::DictionaryValue);
std::string visibility_as_string;
switch (property.visibility()) {
case Property::VISIBILITY_PRIVATE:
@@ -105,7 +106,7 @@ void AttachProperties(const Properties& properties,
property_value->SetString("visibility", visibility_as_string);
property_value->SetString("key", property.key());
property_value->SetString("value", property.value());
- properties_value->Append(property_value);
+ properties_value->Append(std::move(property_value));
}
request_body->Set("properties", properties_value);
}
« no previous file with comments | « device/geolocation/network_location_request.cc ('k') | printing/print_settings_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698