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

Unified Diff: Source/core/loader/FrameLoader.cpp

Issue 1010893003: Upgrade insecure requests: Pipe navigational hosts down into nested documents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: MOARASSERT Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/loader/FrameLoader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index f9b9cce6a50dacf236cd71abb323dc753506f09d..b31c49bc146ae82dcb767448e4801797d67a26c7 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -1403,6 +1403,7 @@ bool FrameLoader::shouldEnforceStrictMixedContentChecking() const
if (!parentFrame->isLocalFrame())
return true;
+ ASSERT(toLocalFrame(parentFrame)->document());
return toLocalFrame(parentFrame)->document()->shouldEnforceStrictMixedContentChecking();
}
@@ -1417,7 +1418,24 @@ SecurityContext::InsecureRequestsPolicy FrameLoader::insecureRequestsPolicy() co
if (!parentFrame->isLocalFrame())
return SecurityContext::InsecureRequestsDoNotUpgrade;
+ ASSERT(toLocalFrame(parentFrame)->document());
return toLocalFrame(parentFrame)->document()->insecureRequestsPolicy();
}
+SecurityContext::InsecureNavigationsSet* FrameLoader::insecureNavigationsToUpgrade() const
+{
+ ASSERT(m_frame);
+ Frame* parentFrame = m_frame->tree().parent();
+ if (!parentFrame)
+ return nullptr;
+
+ // FIXME: We need a way to propagate insecure requests policy flags to
+ // out-of-process frames. For now, we'll always use default behavior.
+ if (!parentFrame->isLocalFrame())
+ return nullptr;
+
+ ASSERT(toLocalFrame(parentFrame)->document());
+ return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade();
+}
+
} // namespace blink
« no previous file with comments | « Source/core/loader/FrameLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698