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

Unified Diff: chrome/browser/autocomplete/keyword_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/keyword_provider.cc
===================================================================
--- chrome/browser/autocomplete/keyword_provider.cc (revision 132905)
+++ chrome/browser/autocomplete/keyword_provider.cc (working copy)
@@ -394,9 +394,8 @@
// input, but we rely on later canonicalization functions to do more
// fixup to make the URL valid if necessary.
DCHECK(element_ref.SupportsReplacement());
- match->destination_url = GURL(element_ref.ReplaceSearchTermsUsingProfile(
- profile, remaining_input, TemplateURLRef::NO_SUGGESTIONS_AVAILABLE,
- string16()));
+ match->destination_url = GURL(element_ref.ReplaceSearchTerms(
+ 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(),
@@ -437,7 +436,7 @@
DCHECK(model);
// Get keyword data from data store.
const TemplateURL* element = model->GetTemplateURLForKeyword(keyword);
- DCHECK(element && !element->url().empty());
+ DCHECK(element);
const bool supports_replacement = element->url_ref().SupportsReplacement();
// Create an edit entry of "[keyword] [remaining input]". This is helpful

Powered by Google App Engine
This is Rietveld 408576698