summaryrefslogtreecommitdiffstats
path: root/chrome/browser/importer
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/importer
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/importer')
-rw-r--r--chrome/browser/importer/importer.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/importer/importer.cc b/chrome/browser/importer/importer.cc
index 77711ac..d4c353d 100644
--- a/chrome/browser/importer/importer.cc
+++ b/chrome/browser/importer/importer.cc
@@ -165,8 +165,7 @@ typedef std::map<std::string, const TemplateURL*> HostPathMap;
// Returns the key for the map built by BuildHostPathMap. If url_string is not
// a valid URL, an empty string is returned, otherwise host+path is returned.
-static std::string HostPathKeyForURL(const std::wstring& url_string) {
- GURL url(url_string);
+static std::string HostPathKeyForURL(const GURL& url) {
return url.is_valid() ? url.host() + url.path() : std::string();
}
@@ -187,7 +186,7 @@ static std::string BuildHostPathKey(const TemplateURL* t_url,
bool try_url_if_invalid) {
if (t_url->url()) {
if (try_url_if_invalid && !t_url->url()->IsValid())
- return HostPathKeyForURL(t_url->url()->url());
+ return HostPathKeyForURL(GURL(WideToUTF8(t_url->url()->url())));
if (t_url->url()->SupportsReplacement()) {
return HostPathKeyForURL(