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

Unified Diff: remoting/host/gcd_rest_client.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 | « remoting/client/plugin/chromoting_instance.cc ('k') | skia/ext/benchmarking_canvas.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/gcd_rest_client.cc
diff --git a/remoting/host/gcd_rest_client.cc b/remoting/host/gcd_rest_client.cc
index a7f82168dfb490ea2d641158aad71e8646d497f9..b58b7ffdbcb992d00c647398e541dca8272d7c79 100644
--- a/remoting/host/gcd_rest_client.cc
+++ b/remoting/host/gcd_rest_client.cc
@@ -57,10 +57,10 @@ void GcdRestClient::PatchState(
std::unique_ptr<base::DictionaryValue> patch_dict(new base::DictionaryValue);
patch_dict->SetDouble("requestTimeMs", now);
std::unique_ptr<base::ListValue> patch_list(new base::ListValue);
- base::DictionaryValue* patch_item = new base::DictionaryValue;
- patch_list->Append(patch_item);
+ std::unique_ptr<base::DictionaryValue> patch_item(new base::DictionaryValue);
patch_item->Set("patch", std::move(patch_details));
patch_item->SetDouble("timeMs", now);
+ patch_list->Append(std::move(patch_item));
patch_dict->Set("patches", std::move(patch_list));
// Stringify the message.
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | skia/ext/benchmarking_canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698