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

Unified Diff: chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc

Issue 2290503003: Remove use of stl_util in search_engines. (Closed)
Patch Set: fix broken test Created 4 years, 3 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/browser/android/contextualsearch/contextual_search_delegate_unittest.cc
diff --git a/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc b/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc
index 0fc6473174503a663ba557639889f89a15d10522..e1cc180a4fca12541e3d58a39a35585cdca6f9b6 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc
+++ b/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc
@@ -10,6 +10,7 @@
#include "base/base64.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
@@ -68,10 +69,9 @@ class ContextualSearchDelegateTest : public testing::Test {
data.SetURL("https://foobar.com/url?bar={searchTerms}");
data.contextual_search_url = "https://foobar.com/_/contextualsearch?"
"{google:contextualSearchVersion}{google:contextualSearchContextData}";
- TemplateURL* template_url = new TemplateURL(data);
- // Takes ownership of |template_url|.
TemplateURLService* template_url_service = new TemplateURLService(NULL, 0);
- template_url_service->Add(template_url);
+ TemplateURL* template_url =
+ template_url_service->Add(base::MakeUnique<TemplateURL>(data));
template_url_service->SetUserSelectedDefaultSearchProvider(template_url);
return template_url_service;
}

Powered by Google App Engine
This is Rietveld 408576698