| 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 * | 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 ThreadableLoaderOptions options = m_options; | 383 ThreadableLoaderOptions options = m_options; |
| 384 options.crossOriginCredentialPolicy = DoNotAskClientForCrossOriginCreden
tials; | 384 options.crossOriginCredentialPolicy = DoNotAskClientForCrossOriginCreden
tials; |
| 385 if (m_actualRequest) { | 385 if (m_actualRequest) { |
| 386 // Don't sniff content or send load callbacks for the preflight requ
est. | 386 // Don't sniff content or send load callbacks for the preflight requ
est. |
| 387 options.sendLoadCallbacks = DoNotSendCallbacks; | 387 options.sendLoadCallbacks = DoNotSendCallbacks; |
| 388 options.sniffContent = DoNotSniffContent; | 388 options.sniffContent = DoNotSniffContent; |
| 389 // Keep buffering the data for the preflight request. | 389 // Keep buffering the data for the preflight request. |
| 390 options.dataBufferingPolicy = BufferData; | 390 options.dataBufferingPolicy = BufferData; |
| 391 } | 391 } |
| 392 | 392 |
| 393 CachedResourceRequest newRequest(request, options); | 393 CachedResourceRequest newRequest(request, m_options.initiator, options); |
| 394 newRequest.setInitiator(m_options.initiator); | |
| 395 ASSERT(!m_resource); | 394 ASSERT(!m_resource); |
| 396 m_resource = m_document->cachedResourceLoader()->requestRawResource(newR
equest); | 395 m_resource = m_document->cachedResourceLoader()->requestRawResource(newR
equest); |
| 397 if (m_resource) { | 396 if (m_resource) { |
| 398 if (m_resource->loader()) { | 397 if (m_resource->loader()) { |
| 399 unsigned long identifier = m_resource->loader()->identifier(); | 398 unsigned long identifier = m_resource->loader()->identifier(); |
| 400 InspectorInstrumentation::documentThreadableLoaderStartedLoading
ForClient(m_document, identifier, m_client); | 399 InspectorInstrumentation::documentThreadableLoaderStartedLoading
ForClient(m_document, identifier, m_client); |
| 401 } | 400 } |
| 402 m_resource->addClient(this); | 401 m_resource->addClient(this); |
| 403 } | 402 } |
| 404 return; | 403 return; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 return true; | 457 return true; |
| 459 return m_document->contentSecurityPolicy()->allowConnectToSource(url); | 458 return m_document->contentSecurityPolicy()->allowConnectToSource(url); |
| 460 } | 459 } |
| 461 | 460 |
| 462 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const | 461 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const |
| 463 { | 462 { |
| 464 return m_options.securityOrigin ? m_options.securityOrigin.get() : m_documen
t->securityOrigin(); | 463 return m_options.securityOrigin ? m_options.securityOrigin.get() : m_documen
t->securityOrigin(); |
| 465 } | 464 } |
| 466 | 465 |
| 467 } // namespace WebCore | 466 } // namespace WebCore |
| OLD | NEW |