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

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

Issue 7558014: Add a URL param to indicate group selection in Instant field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed @pkasting's comments Created 9 years, 4 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
« no previous file with comments | « chrome/browser/autocomplete/keyword_provider.h ('k') | chrome/browser/autocomplete/search_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/keyword_provider.cc
diff --git a/chrome/browser/autocomplete/keyword_provider.cc b/chrome/browser/autocomplete/keyword_provider.cc
index 6a8cc4255f313171d602335f070df7fcc049efc4..957ad97cb0106ae8879cb8fd4553c34f1e2da11a 100644
--- a/chrome/browser/autocomplete/keyword_provider.cc
+++ b/chrome/browser/autocomplete/keyword_provider.cc
@@ -319,6 +319,7 @@ string16 KeywordProvider::SplitKeywordFromInput(
// static
void KeywordProvider::FillInURLAndContents(
+ Profile* profile,
const string16& remaining_input,
const TemplateURL* element,
AutocompleteMatch* match) {
@@ -354,9 +355,9 @@ void KeywordProvider::FillInURLAndContents(
// input, but we rely on later canonicalization functions to do more
// fixup to make the URL valid if necessary.
DCHECK(element->url()->SupportsReplacement());
- match->destination_url = GURL(element->url()->ReplaceSearchTerms(
- *element, remaining_input,
- TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, string16()));
+ match->destination_url = GURL(element->url()->
+ ReplaceSearchTermsUsingProfile(profile, *element, remaining_input,
+ TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, string16()));
std::vector<size_t> content_param_offsets;
match->contents.assign(l10n_util::GetStringFUTF16(message_id,
element->short_name(),
@@ -430,7 +431,7 @@ AutocompleteMatch KeywordProvider::CreateAutocompleteMatch(
// Create destination URL and popup entry content by substituting user input
// into keyword templates.
- FillInURLAndContents(remaining_input, element, &result);
+ FillInURLAndContents(profile_, remaining_input, element, &result);
if (supports_replacement)
result.template_url = element;
« no previous file with comments | « chrome/browser/autocomplete/keyword_provider.h ('k') | chrome/browser/autocomplete/search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698