Index: Source/core/loader/FrameLoader.cpp |
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp |
index f9b9cce6a50dacf236cd71abb323dc753506f09d..d3329c11bc3171ea1385b6f9848fa45dbeb8ce46 100644 |
--- a/Source/core/loader/FrameLoader.cpp |
+++ b/Source/core/loader/FrameLoader.cpp |
@@ -1417,7 +1417,23 @@ 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; |
+ |
+ return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade(); |
Yoav Weiss
2015/03/18 09:48:35
Yeah, obviously parentFrame should have a document
|
+} |
+ |
} // namespace blink |