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

Unified Diff: url/gurl.cc

Issue 23064011: Consolidate scheme checks into an easy GURL method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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 | « url/gurl.h ('k') | webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/gurl.cc
diff --git a/url/gurl.cc b/url/gurl.cc
index 09b8abbcc23933c884e1fe62a2fea9fac54c2386..229df5dca2dbd6d1ab3de26c96d4d3afca49b60b 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);
« no previous file with comments | « url/gurl.h ('k') | webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698