diff options
Diffstat (limited to 'chrome/browser/autocomplete/search_provider.cc')
| -rw-r--r-- | chrome/browser/autocomplete/search_provider.cc | 10 |
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. |
