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

Unified Diff: chrome/test/chromedriver/chrome/web_view_impl.cc

Issue 2838893002: Remove base::ListValue::Set(size_t, base::Value*) (Closed)
Patch Set: Fix Compilation Error Created 3 years, 8 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: chrome/test/chromedriver/chrome/web_view_impl.cc
diff --git a/chrome/test/chromedriver/chrome/web_view_impl.cc b/chrome/test/chromedriver/chrome/web_view_impl.cc
index 219427c8c83ce23a04401b608108025e0640cc6e..152450420f2267ede535ccf5caa5a4b1ccdfb695 100644
--- a/chrome/test/chromedriver/chrome/web_view_impl.cc
+++ b/chrome/test/chromedriver/chrome/web_view_impl.cc
@@ -371,13 +371,13 @@ Status WebViewImpl::DispatchMouseEvents(const std::list<MouseEvent>& events,
Status WebViewImpl::DispatchTouchEvent(const TouchEvent& event) {
base::DictionaryValue params;
params.SetString("type", GetAsString(event.type));
- std::unique_ptr<base::ListValue> point_list(new base::ListValue);
- std::unique_ptr<base::DictionaryValue> point(new base::DictionaryValue);
+ auto point = base::MakeUnique<base::DictionaryValue>();
point->SetString("state", GetPointStateString(event.type));
point->SetInteger("x", event.x);
point->SetInteger("y", event.y);
- point_list->Set(0, point.release());
- params.Set("touchPoints", point_list.release());
+ auto point_list = base::MakeUnique<base::ListValue>();
+ point_list->Append(std::move(point));
+ params.Set("touchPoints", std::move(point_list));
return client_->SendCommand("Input.dispatchTouchEvent", params);
}

Powered by Google App Engine
This is Rietveld 408576698