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

Unified Diff: url/gurl.h

Issue 2403713002: Add suborigin logic to url::Origin (Closed)
Patch Set: Fix unit test Created 4 years, 2 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/public/common/url_constants.cc ('k') | url/gurl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/gurl.h
diff --git a/url/gurl.h b/url/gurl.h
index ce7e33c0181b01f5df447219f8fb5aa8f424fc7d..5753230db769ad079ac1041a8d5025d441898f58 100644
--- a/url/gurl.h
+++ b/url/gurl.h
@@ -236,7 +236,8 @@ class URL_EXPORT GURL {
// higher-level and more complete semantics. See that function's documentation
// for more detail.
bool SchemeIsCryptographic() const {
- return SchemeIs(url::kHttpsScheme) || SchemeIs(url::kWssScheme);
+ return SchemeIs(url::kHttpsScheme) || SchemeIs(url::kWssScheme) ||
+ SchemeIs(url::kHttpsSuboriginScheme);
}
// Returns true if the scheme is "blob".
@@ -244,6 +245,12 @@ class URL_EXPORT GURL {
return SchemeIs(url::kBlobScheme);
}
+ // Returns true if the scheme indicates a serialized suborigin.
+ bool SchemeIsSuborigin() const {
+ return SchemeIs(url::kHttpSuboriginScheme) ||
+ SchemeIs(url::kHttpsSuboriginScheme);
+ }
+
// The "content" of the URL is everything after the scheme (skipping the
// scheme delimiting colon). It is an error to get the content of an invalid
// URL: the result will be an empty string.
« no previous file with comments | « content/public/common/url_constants.cc ('k') | url/gurl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698