Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(638)

Unified Diff: chrome/browser/autocomplete/search_provider.cc

Issue 109013006: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/search_provider.cc
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc
index 7762b9ee96274c322a4d39027ab903715b6c168d..db57dfb1a46393e44afeb2b471332f346362a5f1 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -427,7 +427,7 @@ AutocompleteMatch SearchProvider::CreateSearchSuggestion(
// values preserve that property. Otherwise, if the user starts editing a
// suggestion, non-Search results will suddenly appear.
if (input.type() == AutocompleteInput::FORCED_QUERY)
- match.fill_into_edit.assign(ASCIIToUTF16("?"));
+ match.fill_into_edit.assign(base::ASCIIToUTF16("?"));
if (is_keyword)
match.fill_into_edit.append(match.keyword + char16(' '));
if (!input.prevent_inline_autocomplete() &&
@@ -726,7 +726,7 @@ void SearchProvider::OnURLFetchComplete(const net::URLFetcher* source) {
if (base::CodepageToUTF16(json_data, charset.c_str(),
base::OnStringConversionError::FAIL,
&data_16))
- json_data = UTF16ToUTF8(data_16);
+ json_data = base::UTF16ToUTF8(data_16);
}
}
@@ -1173,7 +1173,8 @@ bool SearchProvider::ParseSuggestResults(base::Value* root_val,
relevances = NULL;
if (types && types->GetString(index, &type) && (type == "NAVIGATION")) {
// Do not blindly trust the URL coming from the server to be valid.
- GURL url(URLFixerUpper::FixupURL(UTF16ToUTF8(suggestion), std::string()));
+ GURL url(URLFixerUpper::FixupURL(
+ base::UTF16ToUTF8(suggestion), std::string()));
if (url.is_valid() && allow_navsuggest) {
base::string16 title;
if (descriptions != NULL)
@@ -1895,7 +1896,7 @@ AutocompleteMatch SearchProvider::NavigationToMatch(
// Preserve the forced query '?' prefix in |match.fill_into_edit|.
// Otherwise, user edits to a suggestion would show non-Search results.
if (input_.type() == AutocompleteInput::FORCED_QUERY) {
- match.fill_into_edit.insert(0, ASCIIToUTF16("?"));
+ match.fill_into_edit.insert(0, base::ASCIIToUTF16("?"));
if (inline_autocomplete_offset != base::string16::npos)
++inline_autocomplete_offset;
}
« no previous file with comments | « chrome/browser/autocomplete/keyword_provider_unittest.cc ('k') | chrome/browser/autocomplete/search_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698