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

Unified 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: address 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/url_formatter/OWNERS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/url_formatter/elide_url.h
diff --git a/components/url_formatter/elide_url.h b/components/url_formatter/elide_url.h
index acdccbf70e0adf5d293dbf2ba8f2d3ea587feb95..bb34f7c3f5fbeb79028a503d4af87f71fd056418 100644
--- a/components/url_formatter/elide_url.h
+++ b/components/url_formatter/elide_url.h
@@ -84,6 +84,14 @@ base::string16 FormatUrlForSecurityDisplay(
// This is a convenience function for formatting a url::Origin in a concise and
// human-friendly way, to help users make security-related decisions.
+//
+// - Omits the port if it is 0 or the default for the scheme.
+//
+// Do not use this for origins which will be parsed or sent to other
+// applications.
+//
+// Generally, prefer SchemeDisplay::SHOW to omitting the scheme unless there is
+// plenty of indication as to whether the origin is secure elsewhere in the UX.
base::string16 FormatOriginForSecurityDisplay(
const url::Origin& origin,
const SchemeDisplay scheme_display = SchemeDisplay::SHOW);
« 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