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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 if (csp && csp->isActive() && resourceRequest.frameType() != WebURLRequest::
FrameTypeTopLevel && resourceRequest.frameType() != WebURLRequest::FrameTypeAuxi
liary && redirectStatus == ContentSecurityPolicy::DidRedirect) { | 558 if (csp && csp->isActive() && resourceRequest.frameType() != WebURLRequest::
FrameTypeTopLevel && resourceRequest.frameType() != WebURLRequest::FrameTypeAuxi
liary && redirectStatus == ContentSecurityPolicy::DidRedirect) { |
559 ASSERT(frame()->document()); | 559 ASSERT(frame()->document()); |
560 UseCounter::count(frame()->document(), UseCounter::ResourceLoadedAfterRe
directWithCSP); | 560 UseCounter::count(frame()->document(), UseCounter::ResourceLoadedAfterRe
directWithCSP); |
561 } | 561 } |
562 | 562 |
563 // Last of all, check for mixed content. We do this last so that when | 563 // Last of all, check for mixed content. We do this last so that when |
564 // folks block mixed content with a CSP policy, they don't get a warning. | 564 // folks block mixed content with a CSP policy, they don't get a warning. |
565 // They'll still get a warning in the console about CSP blocking the load. | 565 // They'll still get a warning in the console about CSP blocking the load. |
566 MixedContentChecker::ReportingStatus mixedContentReporting = forPreload ? | 566 MixedContentChecker::ReportingStatus mixedContentReporting = forPreload ? |
567 MixedContentChecker::SuppressReport : MixedContentChecker::SendReport; | 567 MixedContentChecker::SuppressReport : MixedContentChecker::SendReport; |
568 if (MixedContentChecker::shouldBlockFetch(MixedContentChecker::effectiveFram
eForFrameType(frame(), resourceRequest.frameType()), resourceRequest, url, mixed
ContentReporting)) | 568 if (MixedContentChecker::shouldBlockFetch(frame(), resourceRequest, url, mix
edContentReporting)) |
569 return ResourceRequestBlockedReasonMixedContent; | 569 return ResourceRequestBlockedReasonMixedContent; |
570 | 570 |
571 return ResourceRequestBlockedReasonNone; | 571 return ResourceRequestBlockedReasonNone; |
572 } | 572 } |
573 | 573 |
574 bool FrameFetchContext::isControlledByServiceWorker() const | 574 bool FrameFetchContext::isControlledByServiceWorker() const |
575 { | 575 { |
576 ASSERT(m_documentLoader || frame()->loader().documentLoader()); | 576 ASSERT(m_documentLoader || frame()->loader().documentLoader()); |
577 if (m_documentLoader) | 577 if (m_documentLoader) |
578 return frame()->loader().client()->isControlledByServiceWorker(*m_docume
ntLoader); | 578 return frame()->loader().client()->isControlledByServiceWorker(*m_docume
ntLoader); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 } | 789 } |
790 | 790 |
791 DEFINE_TRACE(FrameFetchContext) | 791 DEFINE_TRACE(FrameFetchContext) |
792 { | 792 { |
793 visitor->trace(m_document); | 793 visitor->trace(m_document); |
794 visitor->trace(m_documentLoader); | 794 visitor->trace(m_documentLoader); |
795 FetchContext::trace(visitor); | 795 FetchContext::trace(visitor); |
796 } | 796 } |
797 | 797 |
798 } // namespace blink | 798 } // namespace blink |
OLD | NEW |