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

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

Powered by Google App Engine
This is Rietveld 408576698