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

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

Issue 10173001: Add a Profile* member to TemplateURL. This makes some invocations of ReplaceSearchTerms() a bit le… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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/search_provider.cc
===================================================================
--- chrome/browser/autocomplete/search_provider.cc (revision 132905)
+++ chrome/browser/autocomplete/search_provider.cc (working copy)
@@ -89,6 +89,7 @@
SearchProvider::SearchProvider(ACProviderListener* listener, Profile* profile)
: AutocompleteProvider(listener, profile, "Search"),
+ providers_(profile),
suggest_results_pending_(0),
have_suggest_results_(false),
instant_finalized_(false) {
@@ -461,9 +462,8 @@
const string16& text) {
DCHECK(suggestions_url.SupportsReplacement());
content::URLFetcher* fetcher = content::URLFetcher::Create(id,
- GURL(suggestions_url.ReplaceSearchTermsUsingProfile(
- profile_, text, TemplateURLRef::NO_SUGGESTIONS_AVAILABLE,
- string16())),
+ GURL(suggestions_url.ReplaceSearchTerms(text,
+ TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, string16())),
content::URLFetcher::GET, this);
fetcher->SetRequestContext(profile_->GetRequestContext());
fetcher->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES);
@@ -906,8 +906,8 @@
const TemplateURLRef& search_url = provider.url_ref();
DCHECK(search_url.SupportsReplacement());
- match.destination_url = GURL(search_url.ReplaceSearchTermsUsingProfile(
- profile_, query_string, accepted_suggestion, input_text));
+ match.destination_url = GURL(search_url.ReplaceSearchTerms(query_string,
+ accepted_suggestion, input_text));
// Search results don't look like URLs.
match.transition = is_keyword ?

Powered by Google App Engine
This is Rietveld 408576698