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

Unified Diff: Source/core/fetch/CrossOriginAccessControl.h

Issue 149643003: Improve handling of CORS redirects for some resource loads. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use canRequest() when checking redirect origin; remove redundant null checks. Created 6 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
Index: Source/core/fetch/CrossOriginAccessControl.h
diff --git a/Source/core/fetch/CrossOriginAccessControl.h b/Source/core/fetch/CrossOriginAccessControl.h
index 450c342253f38f973a310707154d51168955f776..a96536f553a472e670855a4c2cc1266d66c29d6f 100644
--- a/Source/core/fetch/CrossOriginAccessControl.h
+++ b/Source/core/fetch/CrossOriginAccessControl.h
@@ -37,6 +37,9 @@ namespace WebCore {
typedef HashSet<String, CaseFoldingHash> HTTPHeaderSet;
class HTTPHeaderMap;
+class Resource;
+struct ResourceLoaderOptions;
+class ResourceRequest;
class ResourceResponse;
class SecurityOrigin;
@@ -45,6 +48,12 @@ enum AccessControlStatus {
SharableCrossOrigin
};
+class CrossOriginAccessControl {
+public:
+ static bool isLegalRedirectLocation(const KURL&, String& errorDescription);
+ static bool handleRedirect(Resource*, SecurityOrigin*, ResourceRequest&, const ResourceResponse&, ResourceLoaderOptions&, String&);
+};
+
bool isSimpleCrossOriginAccessRequest(const String& method, const HTTPHeaderMap&);
bool isOnAccessControlSimpleRequestMethodWhitelist(const String&);
bool isOnAccessControlSimpleRequestHeaderWhitelist(const AtomicString& name, const AtomicString& value);

Powered by Google App Engine
This is Rietveld 408576698