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

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

Issue 2888073002: Remove raw DictionaryValue::Set in //chrome (Closed)
Patch Set: Fix Tests Created 3 years, 7 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/commands.cc
diff --git a/chrome/test/chromedriver/commands.cc b/chrome/test/chromedriver/commands.cc
index 3087083eef61372cf079b149043d1710bb3a9675..1c36f9a024ad43e64f0c202afb8c03fd6caf9d52 100644
--- a/chrome/test/chromedriver/commands.cc
+++ b/chrome/test/chromedriver/commands.cc
@@ -45,8 +45,8 @@ void ExecuteGetStatus(
os.SetString("arch", base::SysInfo::OperatingSystemArchitecture());
base::DictionaryValue info;
- info.Set("build", build.DeepCopy());
- info.Set("os", os.DeepCopy());
+ info.Set("build", base::MakeUnique<base::Value>(build));
+ info.Set("os", base::MakeUnique<base::Value>(os));
callback.Run(Status(kOk), std::unique_ptr<base::Value>(info.DeepCopy()),
std::string(), false);
}
@@ -92,8 +92,8 @@ void OnGetSession(const base::WeakPtr<size_t>& session_remaining_count,
(*session_remaining_count)--;
std::unique_ptr<base::DictionaryValue> session(new base::DictionaryValue());
- session->Set("id", new base::Value(session_id));
- session->Set("capabilities", value->DeepCopy());
+ session->SetString("id", session_id);
+ session->Set("capabilities", base::MakeUnique<base::Value>(*value));
session_list->Append(std::move(session));
if (!*session_remaining_count) {

Powered by Google App Engine
This is Rietveld 408576698