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

Unified Diff: content/common/origin_util.cc

Issue 2956643002: Add GURL::HostNoBracketsPiece() (Closed)
Patch Set: Simplify test Created 3 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 | « content/browser/frame_host/mixed_content_navigation_throttle.cc ('k') | ios/web/public/origin_util.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/origin_util.cc
diff --git a/content/common/origin_util.cc b/content/common/origin_util.cc
index 2fdc553b5c55aeca570ec772f5ee53573222fe64..4de5ccb62c661c21391d9e36c10e3626786ceb66 100644
--- a/content/common/origin_util.cc
+++ b/content/common/origin_util.cc
@@ -36,8 +36,7 @@ bool IsOriginSecure(const GURL& url) {
return true;
}
- std::string hostname = url.HostNoBrackets();
- if (net::IsLocalhost(hostname))
+ if (net::IsLocalhost(url.HostNoBracketsPiece()))
return true;
if (base::ContainsValue(url::GetSecureSchemes(), url.scheme()))
@@ -79,7 +78,7 @@ bool IsPotentiallyTrustworthyOrigin(const url::Origin& origin) {
if (base::ContainsValue(url::GetSecureSchemes(), origin.scheme()) ||
base::ContainsValue(url::GetLocalSchemes(), origin.scheme()) ||
- net::IsLocalhost(origin.GetURL().HostNoBrackets())) {
+ net::IsLocalhost(origin.GetURL().HostNoBracketsPiece())) {
return true;
}
« no previous file with comments | « content/browser/frame_host/mixed_content_navigation_throttle.cc ('k') | ios/web/public/origin_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698