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

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
Index: url/gurl.cc
diff --git a/url/gurl.cc b/url/gurl.cc
index 09b8abbcc23933c884e1fe62a2fea9fac54c2386..03ef3040252e760f56d0fed377f4ef2552fefcee 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::SchemeIsHttp() const {
+ return SchemeIs("http") || SchemeIs("https");
+}
+
int GURL::IntPort() const {
if (parsed_.port.is_nonempty())
return url_parse::ParsePort(spec_.data(), parsed_.port);

Powered by Google App Engine
This is Rietveld 408576698