diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-10 23:52:43 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-10 23:52:43 +0000 |
commit | e7a5b787751ed3c1c31f66ae919f11911393b974 (patch) | |
tree | 7627eb287c3e079a240f6cc8f98cf94c36a568b4 /chrome/browser/template_url.cc | |
parent | 01b9961c2ee639c10b07624d40a73702a9f3d0ec (diff) | |
download | chromium_src-e7a5b787751ed3c1c31f66ae919f11911393b974.zip chromium_src-e7a5b787751ed3c1c31f66ae919f11911393b974.tar.gz chromium_src-e7a5b787751ed3c1c31f66ae919f11911393b974.tar.bz2 |
Make the autocomplete system and various other connected bits of code use GURL instead of wstring where appropriate. Original patch by phajdan.jr@gmail.com, r=me,sky. See http://codereview.chromium.org/13205 .
BUG=715234
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6758 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/template_url.cc')
-rw-r--r-- | chrome/browser/template_url.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/template_url.cc b/chrome/browser/template_url.cc index c214db8..ef5fe47 100644 --- a/chrome/browser/template_url.cc +++ b/chrome/browser/template_url.cc @@ -235,17 +235,17 @@ void TemplateURLRef::ParseHostAndSearchTermKey() const { } } -std::wstring TemplateURLRef::ReplaceSearchTerms( +GURL TemplateURLRef::ReplaceSearchTerms( const TemplateURL& host, const std::wstring& terms, int accepted_suggestion, const std::wstring& original_query_for_suggestion) const { ParseIfNecessary(); if (!valid_) - return std::wstring(); + return GURL(); if (replacements_.empty()) - return parsed_url_; + return GURL(WideToUTF8(parsed_url_)); // Encode the search terms so that we know the encoding. const std::vector<std::string>& encodings = host.input_encodings(); @@ -335,7 +335,7 @@ std::wstring TemplateURLRef::ReplaceSearchTerms( } } - return url; + return GURL(WideToUTF8(url)); } bool TemplateURLRef::SupportsReplacement() const { |