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

Unified Diff: url/gurl.h

Issue 1049533002: Add IsOriginSecure and GURL::SchemeUsesTLS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move it to content::, so we can call into net:: and blink::. Created 5 years, 9 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
Index: url/gurl.h
diff --git a/url/gurl.h b/url/gurl.h
index 566fc5e18317f899738a705c310c81b03ec13b7a..75f0528c3272947a1661b1c019448eeebc0c7ed6 100644
--- a/url/gurl.h
+++ b/url/gurl.h
@@ -223,10 +223,11 @@ class URL_EXPORT GURL {
return SchemeIs(url::kFileSystemScheme);
}
- // If the scheme indicates a secure connection
+ // Returns true if the scheme indicates a secure connection.
bool SchemeIsSecure() const {
- return SchemeIs(url::kHttpsScheme) || SchemeIs(url::kWssScheme) ||
- (SchemeIsFileSystem() && inner_url() && inner_url()->SchemeIsSecure());
+ return SchemeIs(url::kFileScheme) || SchemeIs(url::kHttpsScheme) ||
davidben 2015/04/06 21:02:55 I'm worried changing this behavior outright will b
+ SchemeIs(url::kWssScheme) || (SchemeIsFileSystem() && inner_url() &&
brettw 2015/04/06 20:19:05 I found the old way of SchemeIsFileSystem on the s
+ inner_url()->SchemeIsSecure());
}
// Returns true if the scheme is "blob".
@@ -241,7 +242,6 @@ class URL_EXPORT GURL {
// Returns true if the hostname is an IP address. Note: this function isn't
// as cheap as a simple getter because it re-parses the hostname to verify.
- // This currently identifies only IPv4 addresses (bug 822685).
bool HostIsIPAddress() const;
// Getters for various components of the URL. The returned string will be
@@ -310,7 +310,7 @@ class URL_EXPORT GURL {
// values defined in Parsed for ExtractPort.
int IntPort() const;
- // Returns the port number of the url, or the default port number.
+ // Returns the port number of the URL, or the default port number.
// If the scheme has no concept of port (or unknown default) returns
// PORT_UNSPECIFIED.
int EffectiveIntPort() const;

Powered by Google App Engine
This is Rietveld 408576698