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

Unified Diff: chrome/browser/autocomplete/history_url_provider_unittest.cc

Issue 367863005: No chrome dependencies in TemplateURLService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename to TemplateURLServiceClient Created 6 years, 6 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/autocomplete/history_url_provider_unittest.cc
diff --git a/chrome/browser/autocomplete/history_url_provider_unittest.cc b/chrome/browser/autocomplete/history_url_provider_unittest.cc
index eb38728ecaabf1875a615130f1b9b9ce4b2d1048..ceeb182cf578303ac88575fa4840e2b6fa78f3cb 100644
--- a/chrome/browser/autocomplete/history_url_provider_unittest.cc
+++ b/chrome/browser/autocomplete/history_url_provider_unittest.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/autocomplete/history_quick_provider.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
+#include "chrome/browser/search_engines/chrome_template_url_service_client.h"
#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/common/pref_names.h"
@@ -28,6 +29,7 @@
#include "components/history/core/browser/url_database.h"
#include "components/metrics/proto/omnibox_event.pb.h"
#include "components/metrics/proto/omnibox_input_type.pb.h"
+#include "components/search_engines/search_terms_data.h"
#include "components/search_engines/template_url.h"
#include "components/url_fixer/url_fixer.h"
#include "content/public/test/test_browser_thread_bundle.h"
@@ -169,9 +171,13 @@ class HistoryURLProviderTest : public testing::Test,
protected:
static KeyedService* CreateTemplateURLService(
- content::BrowserContext* profile) {
- return new TemplateURLService(static_cast<Profile*>(profile), NULL,
- base::Closure());
+ content::BrowserContext* context) {
+ Profile* profile = static_cast<Profile*>(context);
+ return new TemplateURLService(
+ profile->GetPrefs(), make_scoped_ptr(new SearchTermsData), NULL,
+ scoped_ptr<TemplateURLServiceClient>(
+ new ChromeTemplateURLServiceClient(profile)),
+ NULL, NULL, base::Closure());
}
// testing::Test

Powered by Google App Engine
This is Rietveld 408576698