diff options
author | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-04 06:49:58 +0000 |
---|---|---|
committer | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-04 06:49:58 +0000 |
commit | d154026cca5ac89e3b9b93acf41296efff5dc5c7 (patch) | |
tree | 9323bf6460d6aaa9cc8510aba349203964f544c7 /chrome/browser/autocomplete/search_provider.cc | |
parent | b6a0c59e8bb89b56ef158f640b091b0c809443a4 (diff) | |
download | chromium_src-d154026cca5ac89e3b9b93acf41296efff5dc5c7.zip chromium_src-d154026cca5ac89e3b9b93acf41296efff5dc5c7.tar.gz chromium_src-d154026cca5ac89e3b9b93acf41296efff5dc5c7.tar.bz2 |
Revert 130431 - Move the URL string from TemplateURLRef onto the owning TemplateURL. This will make it easier to move the data members of TemplateURL into a new class later.
This changes the accessors for TemplateURL's TemplateURLRefs. There are now separate accessors for the URLs as strings and as TemplateURLRefs, and the latter have changed to returning a const ref, meaning they no longer return NULL when the corresponding URL string is empty. This makes a number of callers clearer.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9968016
TBR=pkasting@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9965143
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130566 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/search_provider.cc')
-rw-r--r-- | chrome/browser/autocomplete/search_provider.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc index 078947c..3770635 100644 --- a/chrome/browser/autocomplete/search_provider.cc +++ b/chrome/browser/autocomplete/search_provider.cc @@ -455,10 +455,10 @@ content::URLFetcher* SearchProvider::CreateSuggestFetcher( int id, const TemplateURL& provider, const string16& text) { - const TemplateURLRef& suggestions_url = provider.suggestions_url_ref(); - DCHECK(suggestions_url.SupportsReplacement()); + const TemplateURLRef* const suggestions_url = provider.suggestions_url(); + 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 @@ void SearchProvider::AddMatchToMap(const string16& query_string, input_text)) match.inline_autocomplete_offset = search_start + input_text.length(); - const TemplateURLRef& search_url = provider.url_ref(); - DCHECK(search_url.SupportsReplacement()); - match.destination_url = GURL(search_url.ReplaceSearchTermsUsingProfile( + const TemplateURLRef* const search_url = provider.url(); + 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. |