| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 if (csp && csp->isActive() && resourceRequest.frameType() != WebURLRequest::
FrameTypeTopLevel && resourceRequest.frameType() != WebURLRequest::FrameTypeAuxi
liary && redirectStatus == ContentSecurityPolicy::DidRedirect) { | 551 if (csp && csp->isActive() && resourceRequest.frameType() != WebURLRequest::
FrameTypeTopLevel && resourceRequest.frameType() != WebURLRequest::FrameTypeAuxi
liary && redirectStatus == ContentSecurityPolicy::DidRedirect) { |
| 552 ASSERT(frame()->document()); | 552 ASSERT(frame()->document()); |
| 553 UseCounter::count(frame()->document(), UseCounter::ResourceLoadedAfterRe
directWithCSP); | 553 UseCounter::count(frame()->document(), UseCounter::ResourceLoadedAfterRe
directWithCSP); |
| 554 } | 554 } |
| 555 | 555 |
| 556 // Last of all, check for mixed content. We do this last so that when | 556 // Last of all, check for mixed content. We do this last so that when |
| 557 // folks block mixed content with a CSP policy, they don't get a warning. | 557 // folks block mixed content with a CSP policy, they don't get a warning. |
| 558 // They'll still get a warning in the console about CSP blocking the load. | 558 // They'll still get a warning in the console about CSP blocking the load. |
| 559 MixedContentChecker::ReportingStatus mixedContentReporting = forPreload ? | 559 MixedContentChecker::ReportingStatus mixedContentReporting = forPreload ? |
| 560 MixedContentChecker::SuppressReport : MixedContentChecker::SendReport; | 560 MixedContentChecker::SuppressReport : MixedContentChecker::SendReport; |
| 561 if (MixedContentChecker::shouldBlockFetch(MixedContentChecker::effectiveFram
eForFrameType(frame(), resourceRequest.frameType()), resourceRequest, url, mixed
ContentReporting)) | 561 if (MixedContentChecker::shouldBlockFetch(frame(), resourceRequest, url, mix
edContentReporting)) |
| 562 return ResourceRequestBlockedReasonMixedContent; | 562 return ResourceRequestBlockedReasonMixedContent; |
| 563 | 563 |
| 564 return ResourceRequestBlockedReasonNone; | 564 return ResourceRequestBlockedReasonNone; |
| 565 } | 565 } |
| 566 | 566 |
| 567 bool FrameFetchContext::isControlledByServiceWorker() const | 567 bool FrameFetchContext::isControlledByServiceWorker() const |
| 568 { | 568 { |
| 569 ASSERT(m_documentLoader || frame()->loader().documentLoader()); | 569 ASSERT(m_documentLoader || frame()->loader().documentLoader()); |
| 570 if (m_documentLoader) | 570 if (m_documentLoader) |
| 571 return frame()->loader().client()->isControlledByServiceWorker(*m_docume
ntLoader); | 571 return frame()->loader().client()->isControlledByServiceWorker(*m_docume
ntLoader); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 } | 782 } |
| 783 | 783 |
| 784 DEFINE_TRACE(FrameFetchContext) | 784 DEFINE_TRACE(FrameFetchContext) |
| 785 { | 785 { |
| 786 visitor->trace(m_document); | 786 visitor->trace(m_document); |
| 787 visitor->trace(m_documentLoader); | 787 visitor->trace(m_documentLoader); |
| 788 FetchContext::trace(visitor); | 788 FetchContext::trace(visitor); |
| 789 } | 789 } |
| 790 | 790 |
| 791 } // namespace blink | 791 } // namespace blink |
| OLD | NEW |