OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
6 * (http://www.torchmobile.com/) | 6 * (http://www.torchmobile.com/) |
7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
10 * Copyright (C) 2011 Google Inc. All rights reserved. | 10 * Copyright (C) 2011 Google Inc. All rights reserved. |
(...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1953 | 1953 |
1954 // If we don't yet have an |m_document| (because we're loading an iframe, for | 1954 // If we don't yet have an |m_document| (because we're loading an iframe, for |
1955 // instance), check the FrameLoader's policy. | 1955 // instance), check the FrameLoader's policy. |
1956 WebInsecureRequestPolicy relevantPolicy = | 1956 WebInsecureRequestPolicy relevantPolicy = |
1957 document ? document->getInsecureRequestPolicy() | 1957 document ? document->getInsecureRequestPolicy() |
1958 : getInsecureRequestPolicy(); | 1958 : getInsecureRequestPolicy(); |
1959 SecurityContext::InsecureNavigationsSet* relevantNavigationSet = | 1959 SecurityContext::InsecureNavigationsSet* relevantNavigationSet = |
1960 document ? document->insecureNavigationsToUpgrade() | 1960 document ? document->insecureNavigationsToUpgrade() |
1961 : insecureNavigationsToUpgrade(); | 1961 : insecureNavigationsToUpgrade(); |
1962 | 1962 |
| 1963 resourceRequest.setInsecureRequestPolicy(relevantPolicy); |
| 1964 |
1963 if (url.protocolIs("http") && relevantPolicy & kUpgradeInsecureRequests) { | 1965 if (url.protocolIs("http") && relevantPolicy & kUpgradeInsecureRequests) { |
1964 // We always upgrade requests that meet any of the following criteria: | 1966 // We always upgrade requests that meet any of the following criteria: |
1965 // | 1967 // |
1966 // 1. Are for subresources (including nested frames). | 1968 // 1. Are for subresources (including nested frames). |
1967 // 2. Are form submissions. | 1969 // 2. Are form submissions. |
1968 // 3. Whose hosts are contained in the document's InsecureNavigationSet. | 1970 // 3. Whose hosts are contained in the document's InsecureNavigationSet. |
1969 if (resourceRequest.frameType() == WebURLRequest::FrameTypeNone || | 1971 if (resourceRequest.frameType() == WebURLRequest::FrameTypeNone || |
1970 resourceRequest.frameType() == WebURLRequest::FrameTypeNested || | 1972 resourceRequest.frameType() == WebURLRequest::FrameTypeNested || |
1971 resourceRequest.requestContext() == WebURLRequest::RequestContextForm || | 1973 resourceRequest.requestContext() == WebURLRequest::RequestContextForm || |
1972 (!url.host().isNull() && | 1974 (!url.host().isNull() && |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2032 m_isNavigationHandledByClient = true; | 2034 m_isNavigationHandledByClient = true; |
2033 InspectorInstrumentation::frameScheduledClientNavigation(m_frame); | 2035 InspectorInstrumentation::frameScheduledClientNavigation(m_frame); |
2034 } | 2036 } |
2035 | 2037 |
2036 void FrameLoader::clearNavigationHandledByClient() { | 2038 void FrameLoader::clearNavigationHandledByClient() { |
2037 m_isNavigationHandledByClient = false; | 2039 m_isNavigationHandledByClient = false; |
2038 InspectorInstrumentation::frameClearedScheduledClientNavigation(m_frame); | 2040 InspectorInstrumentation::frameClearedScheduledClientNavigation(m_frame); |
2039 } | 2041 } |
2040 | 2042 |
2041 } // namespace blink | 2043 } // namespace blink |
OLD | NEW |