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

Side by Side Diff: Source/core/fetch/CrossOriginAccessControl.h

Issue 1016373002: Perform CORS access checks on Beacon redirects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 28 matching lines...) Expand all
39 class ExecutionContext; 39 class ExecutionContext;
40 class Resource; 40 class Resource;
41 struct ResourceLoaderOptions; 41 struct ResourceLoaderOptions;
42 class ResourceRequest; 42 class ResourceRequest;
43 class ResourceResponse; 43 class ResourceResponse;
44 class SecurityOrigin; 44 class SecurityOrigin;
45 45
46 class CrossOriginAccessControl { 46 class CrossOriginAccessControl {
47 public: 47 public:
48 static bool isLegalRedirectLocation(const KURL&, String& errorDescription); 48 static bool isLegalRedirectLocation(const KURL&, String& errorDescription);
49 static bool handleRedirect(ExecutionContext*, Resource*, SecurityOrigin*, Re sourceRequest&, const ResourceResponse&, ResourceLoaderOptions&, String&); 49 static bool handleRedirect(ExecutionContext*, SecurityOrigin*, ResourceReque st&, const ResourceResponse&, StoredCredentials, ResourceLoaderOptions&, String& );
50 }; 50 };
51 51
52 bool isOnAccessControlResponseHeaderWhitelist(const String&); 52 bool isOnAccessControlResponseHeaderWhitelist(const String&);
53 53
54 void updateRequestForAccessControl(ResourceRequest&, SecurityOrigin*, StoredCred entials); 54 void updateRequestForAccessControl(ResourceRequest&, SecurityOrigin*, StoredCred entials);
55 ResourceRequest createAccessControlPreflightRequest(const ResourceRequest&, Secu rityOrigin*); 55 ResourceRequest createAccessControlPreflightRequest(const ResourceRequest&, Secu rityOrigin*);
56 56
57 bool passesAccessControlCheck(ExecutionContext*, const ResourceResponse&, Stored Credentials, SecurityOrigin*, String& errorDescription); 57 bool passesAccessControlCheck(ExecutionContext*, const ResourceResponse&, Stored Credentials, SecurityOrigin*, String& errorDescription);
58 bool passesPreflightStatusCheck(const ResourceResponse&, String& errorDescriptio n); 58 bool passesPreflightStatusCheck(const ResourceResponse&, String& errorDescriptio n);
59 void parseAccessControlExposeHeadersAllowList(const String& headerValue, HTTPHea derSet&); 59 void parseAccessControlExposeHeadersAllowList(const String& headerValue, HTTPHea derSet&);
60 60
61 } // namespace blink 61 } // namespace blink
62 62
63 #endif // CrossOriginAccessControl_h 63 #endif // CrossOriginAccessControl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698