Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 1550723003: Adapt MixedContentChecker for remote frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix up layout tests Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 if (csp && csp->isActive() && resourceRequest.frameType() != WebURLRequest:: FrameTypeTopLevel && resourceRequest.frameType() != WebURLRequest::FrameTypeAuxi liary && redirectStatus == ContentSecurityPolicy::DidRedirect) { 549 if (csp && csp->isActive() && resourceRequest.frameType() != WebURLRequest:: FrameTypeTopLevel && resourceRequest.frameType() != WebURLRequest::FrameTypeAuxi liary && redirectStatus == ContentSecurityPolicy::DidRedirect) {
550 ASSERT(frame()->document()); 550 ASSERT(frame()->document());
551 UseCounter::count(frame()->document(), UseCounter::ResourceLoadedAfterRe directWithCSP); 551 UseCounter::count(frame()->document(), UseCounter::ResourceLoadedAfterRe directWithCSP);
552 } 552 }
553 553
554 // Last of all, check for mixed content. We do this last so that when 554 // Last of all, check for mixed content. We do this last so that when
555 // folks block mixed content with a CSP policy, they don't get a warning. 555 // folks block mixed content with a CSP policy, they don't get a warning.
556 // They'll still get a warning in the console about CSP blocking the load. 556 // They'll still get a warning in the console about CSP blocking the load.
557 MixedContentChecker::ReportingStatus mixedContentReporting = forPreload ? 557 MixedContentChecker::ReportingStatus mixedContentReporting = forPreload ?
558 MixedContentChecker::SuppressReport : MixedContentChecker::SendReport; 558 MixedContentChecker::SuppressReport : MixedContentChecker::SendReport;
559 if (MixedContentChecker::shouldBlockFetch(MixedContentChecker::effectiveFram eForFrameType(frame(), resourceRequest.frameType()), resourceRequest, url, mixed ContentReporting)) 559 if (MixedContentChecker::shouldBlockFetch(frame(), resourceRequest, url, mix edContentReporting))
560 return ResourceRequestBlockedReasonMixedContent; 560 return ResourceRequestBlockedReasonMixedContent;
561 561
562 return ResourceRequestBlockedReasonNone; 562 return ResourceRequestBlockedReasonNone;
563 } 563 }
564 564
565 bool FrameFetchContext::isControlledByServiceWorker() const 565 bool FrameFetchContext::isControlledByServiceWorker() const
566 { 566 {
567 ASSERT(m_documentLoader || frame()->loader().documentLoader()); 567 ASSERT(m_documentLoader || frame()->loader().documentLoader());
568 if (m_documentLoader) 568 if (m_documentLoader)
569 return frame()->loader().client()->isControlledByServiceWorker(*m_docume ntLoader); 569 return frame()->loader().client()->isControlledByServiceWorker(*m_docume ntLoader);
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 } 780 }
781 781
782 DEFINE_TRACE(FrameFetchContext) 782 DEFINE_TRACE(FrameFetchContext)
783 { 783 {
784 visitor->trace(m_document); 784 visitor->trace(m_document);
785 visitor->trace(m_documentLoader); 785 visitor->trace(m_documentLoader);
786 FetchContext::trace(visitor); 786 FetchContext::trace(visitor);
787 } 787 }
788 788
789 } // namespace blink 789 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698