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

Unified Diff: components/url_formatter/url_formatter.cc

Issue 2375803002: Use Unicode in Format{Origin,URL}forSecurityDisplay (Closed)
Patch Set: mention {LSI, PDI} as well Created 4 years, 2 months 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
« no previous file with comments | « components/url_formatter/url_formatter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/url_formatter/url_formatter.cc
diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatter/url_formatter.cc
index 75f17262d4746e33a8bd208c50de169989807c5f..4455db3e6337ac6ff4e09a02becb5a1ea6a1cd74 100644
--- a/components/url_formatter/url_formatter.cc
+++ b/components/url_formatter/url_formatter.cc
@@ -29,7 +29,7 @@ namespace url_formatter {
namespace {
base::string16 IDNToUnicodeWithAdjustments(
- const std::string& host,
+ base::StringPiece host,
base::OffsetAdjuster::Adjustments* adjustments);
bool IDNToUnicodeOneComponent(const base::char16* comp,
size_t comp_len,
@@ -192,8 +192,7 @@ base::string16 FormatViewSourceUrl(
// TODO(brettw): We may want to skip this step in the case of file URLs to
// allow unicode UNC hostnames regardless of encodings.
base::string16 IDNToUnicodeWithAdjustments(
- const std::string& host,
- base::OffsetAdjuster::Adjustments* adjustments) {
+ base::StringPiece host, base::OffsetAdjuster::Adjustments* adjustments) {
if (adjustments)
adjustments->clear();
// Convert the ASCII input to a base::string16 for ICU.
@@ -782,7 +781,7 @@ void AppendFormattedHost(const GURL& url, base::string16* output) {
HostComponentTransform(), output, NULL, NULL);
}
-base::string16 IDNToUnicode(const std::string& host) {
+base::string16 IDNToUnicode(base::StringPiece host) {
return IDNToUnicodeWithAdjustments(host, nullptr);
}
« no previous file with comments | « components/url_formatter/url_formatter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698