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

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

Issue 354773002: Reduces dependency from AutocompleteMatch to Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/autocomplete_provider_unittest.cc
diff --git a/chrome/browser/autocomplete/autocomplete_provider_unittest.cc b/chrome/browser/autocomplete/autocomplete_provider_unittest.cc
index 504b1b399933406ce80f84daef7e2d3fb171e347..fde091c6b9d49766d11f9ab8c098c9f9f7564e02 100644
--- a/chrome/browser/autocomplete/autocomplete_provider_unittest.cc
+++ b/chrome/browser/autocomplete/autocomplete_provider_unittest.cc
@@ -143,7 +143,9 @@ void TestProvider::AddResultsWithSearchTermsArgs(
new TemplateURLRef::SearchTermsArgs(search_terms_args));
if (!match_keyword_.empty()) {
match.keyword = match_keyword_;
- ASSERT_TRUE(match.GetTemplateURL(profile_, false) != NULL);
+ TemplateURLService* service =
+ TemplateURLServiceFactory::GetForProfile(profile_);
+ ASSERT_TRUE(match.GetTemplateURL(service, false) != NULL);
}
matches_.push_back(match);
@@ -268,7 +270,8 @@ void AutocompleteProviderTest::ResetControllerWithTestProviders(
providers.push_back(provider2);
// Reset the controller to contain our new providers.
- controller_.reset(new AutocompleteController(&profile_, NULL, 0));
+ controller_.reset(new AutocompleteController(
+ &profile_, TemplateURLServiceFactory::GetForProfile(&profile_), NULL, 0));
// We're going to swap the providers vector, but the old vector should be
// empty so no elements need to be freed at this point.
EXPECT_TRUE(controller_->providers_.empty());
@@ -314,7 +317,7 @@ void AutocompleteProviderTest::
ASSERT_NE(0, keyword_t_url->id());
controller_.reset(new AutocompleteController(
- &profile_, NULL,
+ &profile_, TemplateURLServiceFactory::GetForProfile(&profile_), NULL,
AutocompleteProvider::TYPE_KEYWORD | AutocompleteProvider::TYPE_SEARCH));
}
@@ -343,7 +346,8 @@ void AutocompleteProviderTest::ResetControllerWithKeywordProvider() {
ASSERT_NE(0, keyword_t_url->id());
controller_.reset(new AutocompleteController(
- &profile_, NULL, AutocompleteProvider::TYPE_KEYWORD));
+ &profile_, TemplateURLServiceFactory::GetForProfile(&profile_), NULL,
+ AutocompleteProvider::TYPE_KEYWORD));
}
void AutocompleteProviderTest::RunTest() {
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_match.cc ('k') | chrome/browser/autocomplete/autocomplete_result.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698