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

Unified Diff: chrome/test/chromedriver/chrome_launcher.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/chrome_launcher.cc
diff --git a/chrome/test/chromedriver/chrome_launcher.cc b/chrome/test/chromedriver/chrome_launcher.cc
index 58b0d1db238daee107738693d6df07fc35caad22..22a7d37c4d3efc9decfd15baaf82eadb6f52e0ed 100644
--- a/chrome/test/chromedriver/chrome_launcher.cc
+++ b/chrome/test/chromedriver/chrome_launcher.cc
@@ -6,6 +6,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <algorithm>
#include <memory>
#include <utility>
@@ -21,6 +22,7 @@
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/process/kill.h"
#include "base/process/launch.h"
#include "base/process/process.h"
@@ -816,7 +818,7 @@ Status WritePrefsFile(
if (custom_prefs) {
for (base::DictionaryValue::Iterator it(*custom_prefs); !it.IsAtEnd();
it.Advance()) {
- prefs->Set(it.key(), it.value().DeepCopy());
+ prefs->Set(it.key(), base::MakeUnique<base::Value>(it.value()));
}
}

Powered by Google App Engine
This is Rietveld 408576698