| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013, Intel Corporation | 3 * Copyright (C) 2013, Intel Corporation |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 newRequest.setFetchRequestMode(WebURLRequest::FetchRequestModeSa
meOrigin); | 203 newRequest.setFetchRequestMode(WebURLRequest::FetchRequestModeSa
meOrigin); |
| 204 break; | 204 break; |
| 205 case UseAccessControl: | 205 case UseAccessControl: |
| 206 if (m_options.preflightPolicy == ForcePreflight) | 206 if (m_options.preflightPolicy == ForcePreflight) |
| 207 newRequest.setFetchRequestMode(WebURLRequest::FetchRequestMo
deCORSWithForcedPreflight); | 207 newRequest.setFetchRequestMode(WebURLRequest::FetchRequestMo
deCORSWithForcedPreflight); |
| 208 else | 208 else |
| 209 newRequest.setFetchRequestMode(WebURLRequest::FetchRequestMo
deCORS); | 209 newRequest.setFetchRequestMode(WebURLRequest::FetchRequestMo
deCORS); |
| 210 break; | 210 break; |
| 211 case AllowCrossOriginRequests: | 211 case AllowCrossOriginRequests: |
| 212 // No-CORS requests are allowed only for those contexts. | 212 // No-CORS requests are allowed only for those contexts. |
| 213 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(requestContext == WebUR
LRequest::RequestContextAudio || requestContext == WebURLRequest::RequestContext
Video || requestContext == WebURLRequest::RequestContextObject || requestContext
== WebURLRequest::RequestContextFavicon || requestContext == WebURLRequest::Req
uestContextImage || requestContext == WebURLRequest::RequestContextScript); | 213 SECURITY_CHECK(requestContext == WebURLRequest::RequestContextAu
dio || requestContext == WebURLRequest::RequestContextVideo || requestContext ==
WebURLRequest::RequestContextObject || requestContext == WebURLRequest::Request
ContextFavicon || requestContext == WebURLRequest::RequestContextImage || reques
tContext == WebURLRequest::RequestContextScript); |
| 214 newRequest.setFetchRequestMode(WebURLRequest::FetchRequestModeNo
CORS); | 214 newRequest.setFetchRequestMode(WebURLRequest::FetchRequestModeNo
CORS); |
| 215 break; | 215 break; |
| 216 } | 216 } |
| 217 if (m_resourceLoaderOptions.allowCredentials == AllowStoredCredentia
ls) | 217 if (m_resourceLoaderOptions.allowCredentials == AllowStoredCredentia
ls) |
| 218 newRequest.setFetchCredentialsMode(WebURLRequest::FetchCredentia
lsModeInclude); | 218 newRequest.setFetchCredentialsMode(WebURLRequest::FetchCredentia
lsModeInclude); |
| 219 else | 219 else |
| 220 newRequest.setFetchCredentialsMode(WebURLRequest::FetchCredentia
lsModeSameOrigin); | 220 newRequest.setFetchCredentialsMode(WebURLRequest::FetchCredentia
lsModeSameOrigin); |
| 221 } | 221 } |
| 222 if (newRequest.fetchRequestMode() == WebURLRequest::FetchRequestModeCORS
|| newRequest.fetchRequestMode() == WebURLRequest::FetchRequestModeCORSWithForc
edPreflight) { | 222 if (newRequest.fetchRequestMode() == WebURLRequest::FetchRequestModeCORS
|| newRequest.fetchRequestMode() == WebURLRequest::FetchRequestModeCORSWithForc
edPreflight) { |
| 223 m_fallbackRequestForServiceWorker = ResourceRequest(request); | 223 m_fallbackRequestForServiceWorker = ResourceRequest(request); |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); | 936 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); |
| 937 } | 937 } |
| 938 | 938 |
| 939 Document& DocumentThreadableLoader::document() const | 939 Document& DocumentThreadableLoader::document() const |
| 940 { | 940 { |
| 941 ASSERT(m_document); | 941 ASSERT(m_document); |
| 942 return *m_document; | 942 return *m_document; |
| 943 } | 943 } |
| 944 | 944 |
| 945 } // namespace blink | 945 } // namespace blink |
| OLD | NEW |