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

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

Issue 9968016: Move the URL string from TemplateURLRef onto the owning TemplateURL. This will make it easier to m… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 130285)
+++ chrome/browser/autocomplete/search_provider.cc (working copy)
@@ -455,10 +455,10 @@
int id,
const TemplateURL& provider,
const string16& text) {
- const TemplateURLRef* const suggestions_url = provider.suggestions_url();
- DCHECK(suggestions_url->SupportsReplacement());
+ const TemplateURLRef& suggestions_url = provider.suggestions_url_ref();
+ DCHECK(suggestions_url.SupportsReplacement());
content::URLFetcher* fetcher = content::URLFetcher::Create(id,
- GURL(suggestions_url->ReplaceSearchTermsUsingProfile(
+ GURL(suggestions_url.ReplaceSearchTermsUsingProfile(
profile_, text, TemplateURLRef::NO_SUGGESTIONS_AVAILABLE,
string16())),
content::URLFetcher::GET, this);
@@ -901,9 +901,9 @@
input_text))
match.inline_autocomplete_offset = search_start + input_text.length();
- const TemplateURLRef* const search_url = provider.url();
- DCHECK(search_url->SupportsReplacement());
- match.destination_url = GURL(search_url->ReplaceSearchTermsUsingProfile(
+ 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));
// Search results don't look like URLs.
« no previous file with comments | « chrome/browser/autocomplete/search_provider.h ('k') | chrome/browser/autocomplete/search_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698