| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |