diff options
Diffstat (limited to 'url')
-rw-r--r-- | url/gurl.cc | 4 | ||||
-rw-r--r-- | url/gurl.h | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/url/gurl.cc b/url/gurl.cc index 09b8abb..229df5d 100644 --- a/url/gurl.cc +++ b/url/gurl.cc @@ -367,6 +367,10 @@ bool GURL::SchemeIs(const char* lower_ascii_scheme) const { lower_ascii_scheme); } +bool GURL::SchemeIsHTTPOrHTTPS() const { + return SchemeIs("http") || SchemeIs("https"); +} + int GURL::IntPort() const { if (parsed_.port.is_nonempty()) return url_parse::ParsePort(spec_.data(), parsed_.port); @@ -203,6 +203,9 @@ class URL_EXPORT GURL { // object constructions are done. bool SchemeIs(const char* lower_ascii_scheme) const; + // Returns true if the scheme is "http" or "https". + bool SchemeIsHTTPOrHTTPS() const; + // We often need to know if this is a file URL. File URLs are "standard", but // are often treated separately by some programs. bool SchemeIsFile() const { |