Chromium Code Reviews| Index: chrome/browser/ui/elide_url.h |
| diff --git a/chrome/browser/ui/elide_url.h b/chrome/browser/ui/elide_url.h |
| index bd5321a633fbfb5513374903427ca6353be26ada..5df634c0e3779a3ade840c0b2b2a8ac20819ae34 100644 |
| --- a/chrome/browser/ui/elide_url.h |
| +++ b/chrome/browser/ui/elide_url.h |
| @@ -45,4 +45,15 @@ base::string16 ElideHost(const GURL& host_url, |
| const gfx::FontList& font_list, |
| float available_pixel_width); |
| +// This is a convenience function for formatting a URL as an origin in a concise |
| +// and human-friendly way. Use this instead of |net::FormatUrl| when the reader |
| +// needs only to understand the origin (rather than the entire URL). |
| +// |
| +// - Omits the path for standard schemes, excepting file and filesystem. |
| +// - Omits the port if it is the default for the scheme. |
|
Ryan Sleevi
2015/06/01 21:18:46
This is more a comment nit, but after the discussi
palmer
2015/06/01 23:30:34
Do you mean the discussion about file: ?
Ryan Sleevi
2015/06/02 01:08:14
No, I meant filesystem. Filesystem is a non-standa
|
| +// |
| +// Do not use this for URLs which will be parsed or sent to other applications. |
| +base::string16 FormatOriginForDisplay(const GURL& origin, |
| + const std::string& languages); |
| + |
| #endif // CHROME_BROWSER_UI_ELIDE_URL_H_ |