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

Unified Diff: chrome/browser/autocomplete/history_url_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/history_url_provider.cc
diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc
index 34b4d5ddac71863dd3418746f49440ec07be3d84..7c9d4797f880d5d9679e39ba196683bd2cb6c51a 100644
--- a/chrome/browser/autocomplete/history_url_provider.cc
+++ b/chrome/browser/autocomplete/history_url_provider.cc
@@ -101,7 +101,7 @@ GURL ConvertToHostOnly(const history::HistoryMatch& match,
if ((host.spec().length() < (match.input_location + input.length())))
return GURL(); // User typing is longer than this host suggestion.
- const base::string16 spec = UTF8ToUTF16(host.spec());
+ const base::string16 spec = base::UTF8ToUTF16(host.spec());
if (spec.compare(match.input_location, input.length(), input))
return GURL(); // User typing is no longer a prefix.
@@ -430,8 +430,8 @@ AutocompleteMatch HistoryURLProvider::SuggestExactInput(
// This relies on match.destination_url being the non-prefix-trimmed version
// of match.contents.
match.contents = display_string;
- const URLPrefix* best_prefix =
- URLPrefix::BestURLPrefix(UTF8ToUTF16(destination_url.spec()), text);
+ const URLPrefix* best_prefix = URLPrefix::BestURLPrefix(
+ base::UTF8ToUTF16(destination_url.spec()), text);
// It's possible for match.destination_url to not contain the user's input
// at all (so |best_prefix| is NULL), for example if the input is
// "view-source:x" and |destination_url| has an inserted "http://" in the
@@ -521,14 +521,14 @@ void HistoryURLProvider::DoAutocomplete(history::HistoryBackend* backend,
// to work with. CullRedirects() will then reduce the list to
// the best kMaxMatches results.
db->AutocompleteForPrefix(
- UTF16ToUTF8(i->prefix + params->input.text()),
+ base::UTF16ToUTF8(i->prefix + params->input.text()),
kMaxMatches * 2,
(backend == NULL),
&url_matches);
for (history::URLRows::const_iterator j(url_matches.begin());
j != url_matches.end(); ++j) {
const URLPrefix* best_prefix =
- URLPrefix::BestURLPrefix(UTF8ToUTF16(j->url().spec()),
+ URLPrefix::BestURLPrefix(base::UTF8ToUTF16(j->url().spec()),
base::string16());
DCHECK(best_prefix != NULL);
history_matches.push_back(history::HistoryMatch(*j, i->prefix.length(),
@@ -843,7 +843,7 @@ bool HistoryURLProvider::CanFindIntranetURL(
!LowerCaseEqualsASCII(input.scheme(), content::kHttpScheme) ||
!input.parts().host.is_nonempty())
return false;
- const std::string host(UTF16ToUTF8(
+ const std::string host(base::UTF16ToUTF8(
input.text().substr(input.parts().host.begin, input.parts().host.len)));
const size_t registry_length =
net::registry_controlled_domains::GetRegistryLength(

Powered by Google App Engine
This is Rietveld 408576698