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

Unified Diff: components/search_engines/template_url_prepopulate_data_unittest.cc

Issue 2889163002: Remove raw DictionaryValue::Set in //components (Closed)
Patch Set: Nits 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: components/search_engines/template_url_prepopulate_data_unittest.cc
diff --git a/components/search_engines/template_url_prepopulate_data_unittest.cc b/components/search_engines/template_url_prepopulate_data_unittest.cc
index 08c323e07c33fb7f1cfcdf29eaeffb04a00c6bbd..75517f23c4e0490b5502530e39d8553621ff958e 100644
--- a/components/search_engines/template_url_prepopulate_data_unittest.cc
+++ b/components/search_engines/template_url_prepopulate_data_unittest.cc
@@ -12,7 +12,9 @@
#include "base/command_line.h"
#include "base/files/scoped_temp_dir.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/values.h"
#include "components/google/core/browser/google_switches.h"
#include "components/search_engines/prepopulated_engines.h"
#include "components/search_engines/search_engines_pref_names.h"
@@ -159,9 +161,9 @@ TEST_F(TemplateURLPrepopulateDataTest, ProvidersFromPrefs) {
// Test the optional settings too.
entry->SetString("suggest_url", "http://foo.com/suggest?q={searchTerms}");
entry->SetString("instant_url", "http://foo.com/instant?q={searchTerms}");
- base::ListValue* alternate_urls = new base::ListValue;
+ auto alternate_urls = base::MakeUnique<base::ListValue>();
alternate_urls->AppendString("http://foo.com/alternate?q={searchTerms}");
- entry->Set("alternate_urls", alternate_urls);
+ entry->Set("alternate_urls", std::move(alternate_urls));
entry->SetString("search_terms_replacement_key", "espv");
overrides = base::MakeUnique<base::ListValue>();
overrides->Append(entry->CreateDeepCopy());
« no previous file with comments | « components/search_engines/default_search_policy_handler.cc ('k') | components/signin/core/browser/about_signin_internals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698