| 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 | 312 |
| 313 void DocumentThreadableLoader::handleResponse(unsigned long identifier, const Re
sourceResponse& response) | 313 void DocumentThreadableLoader::handleResponse(unsigned long identifier, const Re
sourceResponse& response) |
| 314 { | 314 { |
| 315 ASSERT(m_client); | 315 ASSERT(m_client); |
| 316 | 316 |
| 317 if (m_actualRequest) { | 317 if (m_actualRequest) { |
| 318 handlePreflightResponse(identifier, response); | 318 handlePreflightResponse(identifier, response); |
| 319 return; | 319 return; |
| 320 } | 320 } |
| 321 | 321 |
| 322 // FIXME: When response.wasFetchedViaServiceWorker() is true, we need to che
ck the URL of the responce for CSP and CORS. |
| 323 |
| 322 if (!m_sameOriginRequest && m_options.crossOriginRequestPolicy == UseAccessC
ontrol) { | 324 if (!m_sameOriginRequest && m_options.crossOriginRequestPolicy == UseAccessC
ontrol) { |
| 323 String accessControlErrorDescription; | 325 String accessControlErrorDescription; |
| 324 if (!passesAccessControlCheck(response, effectiveAllowCredentials(), sec
urityOrigin(), accessControlErrorDescription)) { | 326 if (!passesAccessControlCheck(response, effectiveAllowCredentials(), sec
urityOrigin(), accessControlErrorDescription)) { |
| 325 m_client->didFailAccessControlCheck(ResourceError(errorDomainBlinkIn
ternal, 0, response.url().string(), accessControlErrorDescription)); | 327 m_client->didFailAccessControlCheck(ResourceError(errorDomainBlinkIn
ternal, 0, response.url().string(), accessControlErrorDescription)); |
| 326 return; | 328 return; |
| 327 } | 329 } |
| 328 } | 330 } |
| 329 | 331 |
| 330 m_client->didReceiveResponse(identifier, response); | 332 m_client->didReceiveResponse(identifier, response); |
| 331 } | 333 } |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 return DoNotAllowStoredCredentials; | 496 return DoNotAllowStoredCredentials; |
| 495 return m_resourceLoaderOptions.allowCredentials; | 497 return m_resourceLoaderOptions.allowCredentials; |
| 496 } | 498 } |
| 497 | 499 |
| 498 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const | 500 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const |
| 499 { | 501 { |
| 500 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin
(); | 502 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin
(); |
| 501 } | 503 } |
| 502 | 504 |
| 503 } // namespace WebCore | 505 } // namespace WebCore |
| OLD | NEW |