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

Side by Side Diff: components/url_formatter/url_formatter.h

Issue 1394183005: Fix review nits that were missed from https://crrev.com/d7241e515462c10b29a0470c3c3df647ae34be4b. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « components/search_engines/template_url.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // url_formatter contains routines for formatting URLs in a way that can be 5 // url_formatter contains routines for formatting URLs in a way that can be
6 // safely and securely displayed to users. For example, it is responsible 6 // safely and securely displayed to users. For example, it is responsible
7 // for determining when to convert an IDN A-Label (e.g. "xn--[something]") 7 // for determining when to convert an IDN A-Label (e.g. "xn--[something]")
8 // into the IDN U-Label. 8 // into the IDN U-Label.
9 // 9 //
10 // Note that this formatting is only intended for display purposes; it would 10 // Note that this formatting is only intended for display purposes; it would
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // is used to determine whether a hostname is 'comprehensible' to a user 143 // is used to determine whether a hostname is 'comprehensible' to a user
144 // who understands languages listed. |host| will be converted to a 144 // who understands languages listed. |host| will be converted to a
145 // human-readable form (Unicode) ONLY when each component of |host| is 145 // human-readable form (Unicode) ONLY when each component of |host| is
146 // regarded as 'comprehensible'. Scipt-mixing is not allowed except that 146 // regarded as 'comprehensible'. Scipt-mixing is not allowed except that
147 // Latin letters in the ASCII range can be mixed with a limited set of 147 // Latin letters in the ASCII range can be mixed with a limited set of
148 // script-language pairs (currently Han, Kana and Hangul for zh,ja and ko). 148 // script-language pairs (currently Han, Kana and Hangul for zh,ja and ko).
149 // When |languages| is empty, even that mixing is not allowed. 149 // When |languages| is empty, even that mixing is not allowed.
150 base::string16 IDNToUnicode(const std::string& host, 150 base::string16 IDNToUnicode(const std::string& host,
151 const std::string& languages); 151 const std::string& languages);
152 152
153 // If text starts with "www." it is removed, otherwise text is returned 153 // If |text| starts with "www." it is removed, otherwise |text| is returned
154 // unmodified. 154 // unmodified.
155 base::string16 StripWWW(const base::string16& text); 155 base::string16 StripWWW(const base::string16& text);
156 156
157 // Runs |url|'s host through StripWWW(). |url| must be valid. 157 // Runs |url|'s host through StripWWW(). |url| must be valid.
158 base::string16 StripWWWFromHost(const GURL& url); 158 base::string16 StripWWWFromHost(const GURL& url);
159 159
160 } // namespace url_formatter 160 } // namespace url_formatter
161 161
162 #endif // COMPONENTS_URL_FORMATTER_URL_FORMATTER_H_ 162 #endif // COMPONENTS_URL_FORMATTER_URL_FORMATTER_H_
OLDNEW
« no previous file with comments | « components/search_engines/template_url.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698