summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/search_provider.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-24 19:32:15 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-24 19:32:15 +0000
commit1d73faa8d5eea35b1141779e5310a9ababdd798a (patch)
treed6d2373c4a3fcc3c65d7ccae8e5bfe61963d129f /chrome/browser/autocomplete/search_provider.cc
parent553dba6dd707ee02e609910462d2b7977f284af2 (diff)
downloadchromium_src-1d73faa8d5eea35b1141779e5310a9ababdd798a.zip
chromium_src-1d73faa8d5eea35b1141779e5310a9ababdd798a.tar.gz
chromium_src-1d73faa8d5eea35b1141779e5310a9ababdd798a.tar.bz2
Make autocomplete.cc and dependencies compile on Posix.
Review URL: http://codereview.chromium.org/28061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10277 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/search_provider.cc')
-rw-r--r--chrome/browser/autocomplete/search_provider.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc
index 8e39bd0..8c9a8e3 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "build/build_config.h"
+
#include "chrome/browser/autocomplete/search_provider.h"
#include "base/message_loop.h"
@@ -325,7 +327,8 @@ bool SearchProvider::ParseSuggestResults(Value* root_val) {
site_val->GetAsString(&site_name)) {
// We can't blindly trust the URL coming from the server to be valid.
GURL result_url =
- GURL(URLFixerUpper::FixupURL(suggestion_str, std::wstring()));
+ GURL(URLFixerUpper::FixupURL(WideToUTF8(suggestion_str),
+ std::string()));
if (result_url.is_valid()) {
navigation_results_.push_back(NavigationResult(result_url,
site_name));
@@ -577,7 +580,8 @@ AutocompleteMatch SearchProvider::NavigationToMatch(
match.contents = StringForURLDisplay(navigation.url, true);
// TODO(kochi): Consider moving HistoryURLProvider::TrimHttpPrefix() to some
// public utility function.
- if (!url_util::FindAndCompareScheme(input_.text(), "http", NULL))
+ if (!url_util::FindAndCompareScheme(WideToUTF8(input_.text()),
+ "http", NULL))
TrimHttpPrefix(&match.contents);
AutocompleteMatch::ClassifyMatchInString(input_.text(), match.contents,
ACMatchClassification::URL,
@@ -604,7 +608,7 @@ AutocompleteMatch SearchProvider::NavigationToMatch(
// static
size_t SearchProvider::TrimHttpPrefix(std::wstring* url) {
url_parse::Component scheme;
- if (!url_util::FindAndCompareScheme(*url, "http", &scheme))
+ if (!url_util::FindAndCompareScheme(WideToUTF8(*url), "http", &scheme))
return 0; // Not "http".
// Erase scheme plus up to two slashes.