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/views/edit_keyword_controller.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/views/edit_keyword_controller.cc')
-rw-r--r-- | chrome/browser/views/edit_keyword_controller.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/views/edit_keyword_controller.cc b/chrome/browser/views/edit_keyword_controller.cc index efbb43e..4eb913f 100644 --- a/chrome/browser/views/edit_keyword_controller.cc +++ b/chrome/browser/views/edit_keyword_controller.cc @@ -296,14 +296,14 @@ bool EditKeywordController::IsURLValid() const { if (!template_ref.IsValid()) return false; - if (template_ref.SupportsReplacement()) { - // If the url has a search term, replace it with a random string and make - // sure the resulting URL is valid. We don't check the validity of the url - // with the search term as that is not necessarily valid. - url = template_ref.ReplaceSearchTerms(TemplateURL(), L"a", - TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, std::wstring()); - } - return GURL(url).is_valid(); + if (!template_ref.SupportsReplacement()) + return GURL(url).is_valid(); + + // If the url has a search term, replace it with a random string and make + // sure the resulting URL is valid. We don't check the validity of the url + // with the search term as that is not necessarily valid. + return template_ref.ReplaceSearchTerms(TemplateURL(), L"a", + TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, std::wstring()).is_valid(); } std::wstring EditKeywordController::GetURL() const { |