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

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: Passing NULL as far as possible 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
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..b50711a2e9999c50e374903b4cebe41d94f5cc5e 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) {
@@ -355,7 +356,7 @@ void KeywordProvider::FillInURLAndContents(
// fixup to make the URL valid if necessary.
DCHECK(element->url()->SupportsReplacement());
match->destination_url = GURL(element->url()->ReplaceSearchTerms(
- *element, remaining_input,
+ profile, *element, remaining_input,
TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, string16()));
std::vector<size_t> content_param_offsets;
match->contents.assign(l10n_util::GetStringFUTF16(message_id,
@@ -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;

Powered by Google App Engine
This is Rietveld 408576698