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

Unified Diff: net/base/net_util.h

Issue 1258813002: Implement a new IDN display policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add back languages to one more, update comments Created 5 years, 5 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 | « no previous file | net/base/net_util_icu.cc » ('j') | net/base/net_util_icu.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.h
diff --git a/net/base/net_util.h b/net/base/net_util.h
index 628abe2095f67d89840f1cd3ae8731e7e51f29ec..009ced9e79352a8458e366b7de705d2b4285da9f 100644
--- a/net/base/net_util.h
+++ b/net/base/net_util.h
@@ -153,15 +153,7 @@ NET_EXPORT std::string GetHostOrSpecFromURL(const GURL& url);
//
// The input should be the canonicalized ASCII host name from GURL. This
// function does NOT accept UTF-8!
-//
-// |languages| is a comma separated list of ISO 639 language codes. It
-// is used to determine whether a hostname is 'comprehensible' to a user
-// who understands languages listed. |host| will be converted to a
-// human-readable form (Unicode) ONLY when each component of |host| is
-// regarded as 'comprehensible'. Scipt-mixing is not allowed except that
-// Latin letters in the ASCII range can be mixed with a limited set of
-// script-language pairs (currently Han, Kana and Hangul for zh,ja and ko).
-// When |languages| is empty, even that mixing is not allowed.
+// |languages| is not used any more and will be removed.
NET_EXPORT base::string16 IDNToUnicode(const std::string& host,
const std::string& languages);
@@ -215,13 +207,15 @@ NET_EXPORT base::string16 StripWWWFromHost(const GURL& url);
NET_EXPORT int SetNonBlocking(int fd);
// Formats the host in |url| and appends it to |output|. The host formatter
-// takes the same accept languages component as ElideURL().
+// takes the same accept languages component as ElideURL(), but it does not
+// affect the result. It'll be removed.
NET_EXPORT void AppendFormattedHost(const GURL& url,
const std::string& languages,
base::string16* output);
-// Creates a string representation of |url|. The IDN host name may be in Unicode
-// if |languages| accepts the Unicode representation. |format_type| is a bitmask
+// Creates a string representation of |url|. The IDN host name is turned to
+// Unicode if the Unicode representation is deemed safe. |languages| is not
+// used any more and will be removed. |format_type| is a bitmask
// of FormatUrlTypes, see it for details. |unescape_rules| defines how to clean
// the URL for human readability. You will generally want |UnescapeRule::SPACES|
// for display to the user if you can handle spaces, or |UnescapeRule::NORMAL|
@@ -260,7 +254,7 @@ NET_EXPORT base::string16 FormatUrl(const GURL& url,
size_t* offset_for_adjustment);
NET_EXPORT base::string16 FormatUrlWithOffsets(
const GURL& url,
- const std::string& languages,
+ const std::string& langauges,
FormatUrlTypes format_types,
UnescapeRule::Type unescape_rules,
url::Parsed* new_parsed,
« no previous file with comments | « no previous file | net/base/net_util_icu.cc » ('j') | net/base/net_util_icu.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698