summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-10 23:52:43 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-10 23:52:43 +0000
commite7a5b787751ed3c1c31f66ae919f11911393b974 (patch)
tree7627eb287c3e079a240f6cc8f98cf94c36a568b4 /chrome/browser/dom_ui
parent01b9961c2ee639c10b07624d40a73702a9f3d0ec (diff)
downloadchromium_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/dom_ui')
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index f242e38..440bdd1 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -401,13 +401,12 @@ void TemplateURLHandler::HandleDoSearch(const Value* content) {
NOTREACHED();
return;
}
- std::wstring url = url_ref->ReplaceSearchTerms(*template_url, search,
+ GURL url = url_ref->ReplaceSearchTerms(*template_url, search,
TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, std::wstring());
- if (!url.empty()) {
- // Load the URL.
- dom_ui_host_->OpenURL(GURL(WideToUTF8(url)), GURL(), CURRENT_TAB,
- PageTransition::LINK);
+ if (url.is_valid()) {
+ // Load the URL.
+ dom_ui_host_->OpenURL(url, GURL(), CURRENT_TAB, PageTransition::LINK);
// Record the user action
std::vector<const TemplateURL*> urls =