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

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

Issue 1843063002: Don't show scheme in permission prompts if it is HTTPS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // |FormatUrlForSecurityDisplayOmitScheme| unless there is plenty of indication 70 // |FormatUrlForSecurityDisplayOmitScheme| unless there is plenty of indication
71 // as to whether the origin is secure elsewhere in the UX. For example, in 71 // as to whether the origin is secure elsewhere in the UX. For example, in
72 // Chrome's Origin Info Bubble, there are icons and strings indicating origin 72 // Chrome's Origin Info Bubble, there are icons and strings indicating origin
73 // (non-)security. But in the HTTP Basic Auth prompt (for example), the scheme 73 // (non-)security. But in the HTTP Basic Auth prompt (for example), the scheme
74 // may be the only indicator. 74 // may be the only indicator.
75 base::string16 FormatUrlForSecurityDisplay(const GURL& origin, 75 base::string16 FormatUrlForSecurityDisplay(const GURL& origin,
76 const std::string& languages); 76 const std::string& languages);
77 77
78 // Just like |FormatUrlForSecurityDisplay|, but also: 78 // Just like |FormatUrlForSecurityDisplay|, but also:
79 // 79 //
80 // - Omits the scheme if SchemeIsHTTPOrHTTPS(). 80 // - Omits the scheme if scheme is HTTPS.
81 base::string16 FormatUrlForSecurityDisplayOmitScheme( 81 base::string16 FormatUrlForSecurityDisplayOmitScheme(
82 const GURL& origin, 82 const GURL& origin,
83 const std::string& languages); 83 const std::string& languages);
84 84
85 } // namespace url_formatter 85 } // namespace url_formatter
86 86
87 #endif // COMPONENTS_URL_FORMATTER_ELIDE_URL_H_ 87 #endif // COMPONENTS_URL_FORMATTER_ELIDE_URL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698