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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 // Any credential should have been removed from the cross-site requests. | 473 // Any credential should have been removed from the cross-site requests. |
474 const KURL& requestURL = request.url(); | 474 const KURL& requestURL = request.url(); |
475 ASSERT(m_sameOriginRequest || requestURL.user().isEmpty()); | 475 ASSERT(m_sameOriginRequest || requestURL.user().isEmpty()); |
476 ASSERT(m_sameOriginRequest || requestURL.pass().isEmpty()); | 476 ASSERT(m_sameOriginRequest || requestURL.pass().isEmpty()); |
477 | 477 |
478 // Update resourceLoaderOptions with enforced values. | 478 // Update resourceLoaderOptions with enforced values. |
479 if (m_forceDoNotAllowStoredCredentials) | 479 if (m_forceDoNotAllowStoredCredentials) |
480 resourceLoaderOptions.allowCredentials = DoNotAllowStoredCredentials; | 480 resourceLoaderOptions.allowCredentials = DoNotAllowStoredCredentials; |
481 resourceLoaderOptions.securityOrigin = m_securityOrigin; | 481 resourceLoaderOptions.securityOrigin = m_securityOrigin; |
482 if (m_async) { | 482 if (m_async) { |
483 if (m_actualRequest) { | 483 if (m_actualRequest) |
484 resourceLoaderOptions.sniffContent = DoNotSniffContent; | |
485 resourceLoaderOptions.dataBufferingPolicy = BufferData; | 484 resourceLoaderOptions.dataBufferingPolicy = BufferData; |
486 } | |
487 | 485 |
488 if (m_options.timeoutMilliseconds > 0) | 486 if (m_options.timeoutMilliseconds > 0) |
489 m_timeoutTimer.startOneShot(m_options.timeoutMilliseconds / 1000.0,
FROM_HERE); | 487 m_timeoutTimer.startOneShot(m_options.timeoutMilliseconds / 1000.0,
FROM_HERE); |
490 | 488 |
491 FetchRequest newRequest(request, m_options.initiator, resourceLoaderOpti
ons); | 489 FetchRequest newRequest(request, m_options.initiator, resourceLoaderOpti
ons); |
492 if (m_options.crossOriginRequestPolicy == AllowCrossOriginRequests) | 490 if (m_options.crossOriginRequestPolicy == AllowCrossOriginRequests) |
493 newRequest.setOriginRestriction(FetchRequest::NoOriginRestriction); | 491 newRequest.setOriginRestriction(FetchRequest::NoOriginRestriction); |
494 ASSERT(!resource()); | 492 ASSERT(!resource()); |
495 if (request.requestContext() == blink::WebURLRequest::RequestContextVide
o || request.requestContext() == blink::WebURLRequest::RequestContextAudio) | 493 if (request.requestContext() == blink::WebURLRequest::RequestContextVide
o || request.requestContext() == blink::WebURLRequest::RequestContextAudio) |
496 setResource(m_document.fetcher()->fetchMedia(newRequest)); | 494 setResource(m_document.fetcher()->fetchMedia(newRequest)); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 return DoNotAllowStoredCredentials; | 561 return DoNotAllowStoredCredentials; |
564 return m_resourceLoaderOptions.allowCredentials; | 562 return m_resourceLoaderOptions.allowCredentials; |
565 } | 563 } |
566 | 564 |
567 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const | 565 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const |
568 { | 566 { |
569 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin
(); | 567 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin
(); |
570 } | 568 } |
571 | 569 |
572 } // namespace blink | 570 } // namespace blink |
OLD | NEW |