[base] Replace GetList().{emplace,push}_back with Append in //components
This change replaces usages of base::Value::GetList() followed by either
emplace_back() or push_back() with base::Value::Append(). This is
because of the upcoming change to GetList() to return a base::span
instead, which does not support either emplace_back() or push_back().
This is a completely mechanical change. Steps to reproduce:
- sed -i 's/GetList().push_back/Append/g'
- sed -i 's/GetList().emplace_back/Append/g'
- git cl format
Bug: 646113
Change-Id: Ia29bc02040a056e518737f2b11f1cd0b66b0e0f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1796430
Reviewed-by: Colin Blundell <[email protected]>
Commit-Queue: Jan Wilken Dörrie <[email protected]>
Cr-Commit-Position: refs/heads/master@{#695530}
diff --git a/components/ntp_snippets/remote/json_request.cc b/components/ntp_snippets/remote/json_request.cc
index 0dc2ecd..09059e1 100644
--- a/components/ntp_snippets/remote/json_request.cc
+++ b/components/ntp_snippets/remote/json_request.cc
@@ -351,8 +351,7 @@
exclusive_category_parameters.SetInteger("numSuggestions",
params_.count_to_fetch);
base::ListValue category_parameters;
- category_parameters.GetList().push_back(
- std::move(exclusive_category_parameters));
+ category_parameters.Append(std::move(exclusive_category_parameters));
request->SetKey("categoryParameters", std::move(category_parameters));
}