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

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

Issue 2072863002: Update FormatOriginForSecurityDisplay() comments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated FormatOriginForSecurityDisplay() comments Created 4 years, 6 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/url_formatter/OWNERS ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This file defines utility functions for eliding URLs. 5 // This file defines utility functions for eliding URLs.
6 6
7 #ifndef COMPONENTS_URL_FORMATTER_ELIDE_URL_H_ 7 #ifndef COMPONENTS_URL_FORMATTER_ELIDE_URL_H_
8 #define COMPONENTS_URL_FORMATTER_ELIDE_URL_H_ 8 #define COMPONENTS_URL_FORMATTER_ELIDE_URL_H_
9 9
10 #include <string> 10 #include <string>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // plenty of indication as to whether the origin is secure elsewhere in the UX. 77 // plenty of indication as to whether the origin is secure elsewhere in the UX.
78 // For example, in Chrome's Origin Info Bubble, there are icons and strings 78 // For example, in Chrome's Origin Info Bubble, there are icons and strings
79 // indicating origin (non-)security. But in the HTTP Basic Auth prompt (for 79 // indicating origin (non-)security. But in the HTTP Basic Auth prompt (for
80 // example), the scheme may be the only indicator. 80 // example), the scheme may be the only indicator.
81 base::string16 FormatUrlForSecurityDisplay( 81 base::string16 FormatUrlForSecurityDisplay(
82 const GURL& origin, 82 const GURL& origin,
83 const SchemeDisplay scheme_display = SchemeDisplay::SHOW); 83 const SchemeDisplay scheme_display = SchemeDisplay::SHOW);
84 84
85 // This is a convenience function for formatting a url::Origin in a concise and 85 // This is a convenience function for formatting a url::Origin in a concise and
86 // human-friendly way, to help users make security-related decisions. 86 // human-friendly way, to help users make security-related decisions.
87 //
88 // Internationalized domain names (IDN) may be presented in Unicode if
89 // they're regarded safe.
palmer 2016/06/16 22:20:00 Maybe say what "safe" means in this context. Also,
juncai 2016/06/16 22:36:50 Right. This paragraph is removed.
90 //
91 // - Omits the port if it is 0 or the default for the scheme.
92 //
93 // Do not use this for origins which will be parsed or sent to other
94 // applications.
95 //
96 // Generally, prefer SchemeDisplay::SHOW to omitting the scheme unless there is
97 // plenty of indication as to whether the origin is secure elsewhere in the UX.
87 base::string16 FormatOriginForSecurityDisplay( 98 base::string16 FormatOriginForSecurityDisplay(
88 const url::Origin& origin, 99 const url::Origin& origin,
89 const SchemeDisplay scheme_display = SchemeDisplay::SHOW); 100 const SchemeDisplay scheme_display = SchemeDisplay::SHOW);
90 101
91 } // namespace url_formatter 102 } // namespace url_formatter
92 103
93 #endif // COMPONENTS_URL_FORMATTER_ELIDE_URL_H_ 104 #endif // COMPONENTS_URL_FORMATTER_ELIDE_URL_H_
OLDNEW
« no previous file with comments | « components/url_formatter/OWNERS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698