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

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: rebase Created 4 years, 10 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMWindow.cpp ('k') | third_party/WebKit/Source/core/loader/MixedContentChecker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698