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

Unified Diff: third_party/WebKit/public/platform/WebURLRequest.h

Issue 1749153002: CORS-RFC1918: Teach ResourceRequest about "external" requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Jochen's feedback. Created 4 years, 10 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 | « third_party/WebKit/Source/platform/network/ResourceRequest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/WebURLRequest.h
diff --git a/third_party/WebKit/public/platform/WebURLRequest.h b/third_party/WebKit/public/platform/WebURLRequest.h
index f493a316ae24d60c483217ff61142b701555db43..e21ac7fb33c3830bcaddcaae75eaff0fc1b6c7b5 100644
--- a/third_party/WebKit/public/platform/WebURLRequest.h
+++ b/third_party/WebKit/public/platform/WebURLRequest.h
@@ -64,6 +64,14 @@ public:
PriorityVeryHigh,
};
+ // The ordering is important, as it's used to determine whether preflights are required,
+ // as per https://mikewest.github.io/cors-rfc1918/#framework
+ enum AddressSpace {
+ AddressSpaceLocal = 0, // loopback, link local
+ AddressSpacePrivate, // Reserved by RFC1918
+ AddressSpacePublic // Everything else
+ };
+
// Corresponds to Fetch's "context": http://fetch.spec.whatwg.org/#concept-request-context
enum RequestContext {
RequestContextUnspecified = 0,
@@ -307,10 +315,8 @@ public:
BLINK_PLATFORM_EXPORT WebURLRequest::InputToLoadPerfMetricReportPolicy inputPerfMetricReportPolicy() const;
BLINK_PLATFORM_EXPORT void setInputPerfMetricReportPolicy(WebURLRequest::InputToLoadPerfMetricReportPolicy);
- // Does the request originate from a SecurityContext hosted in a reserved
- // (RFC1918) IP range?
- BLINK_PLATFORM_EXPORT bool originatesFromReservedIPRange() const;
- BLINK_PLATFORM_EXPORT void setOriginatesFromReservedIPRange(bool);
+ // https://mikewest.github.io/cors-rfc1918/#external-request
+ BLINK_PLATFORM_EXPORT bool isExternalRequest() const;
#if INSIDE_BLINK
BLINK_PLATFORM_EXPORT ResourceRequest& toMutableResourceRequest();
« no previous file with comments | « third_party/WebKit/Source/platform/network/ResourceRequest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698