| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
| (...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 { | 1565 { |
| 1566 SandboxFlags flags = m_forcedSandboxFlags; | 1566 SandboxFlags flags = m_forcedSandboxFlags; |
| 1567 if (FrameOwner* frameOwner = m_frame->owner()) | 1567 if (FrameOwner* frameOwner = m_frame->owner()) |
| 1568 flags |= frameOwner->getSandboxFlags(); | 1568 flags |= frameOwner->getSandboxFlags(); |
| 1569 // Frames need to inherit the sandbox flags of their parent frame. | 1569 // Frames need to inherit the sandbox flags of their parent frame. |
| 1570 if (Frame* parentFrame = m_frame->tree().parent()) | 1570 if (Frame* parentFrame = m_frame->tree().parent()) |
| 1571 flags |= parentFrame->securityContext()->getSandboxFlags(); | 1571 flags |= parentFrame->securityContext()->getSandboxFlags(); |
| 1572 return flags; | 1572 return flags; |
| 1573 } | 1573 } |
| 1574 | 1574 |
| 1575 bool FrameLoader::shouldEnforceStrictMixedContentChecking() const | 1575 WebInsecureRequestPolicy FrameLoader::getInsecureRequestPolicy() const |
| 1576 { | 1576 { |
| 1577 Frame* parentFrame = m_frame->tree().parent(); | 1577 Frame* parentFrame = m_frame->tree().parent(); |
| 1578 if (!parentFrame) | 1578 if (!parentFrame) |
| 1579 return false; | 1579 return kLeaveInsecureRequestsAlone; |
| 1580 | 1580 |
| 1581 return parentFrame->securityContext()->shouldEnforceStrictMixedContentChecki
ng(); | 1581 return parentFrame->securityContext()->getInsecureRequestPolicy(); |
| 1582 } | |
| 1583 | |
| 1584 SecurityContext::InsecureRequestsPolicy FrameLoader::getInsecureRequestsPolicy()
const | |
| 1585 { | |
| 1586 Frame* parentFrame = m_frame->tree().parent(); | |
| 1587 if (!parentFrame) | |
| 1588 return SecurityContext::InsecureRequestsDoNotUpgrade; | |
| 1589 | |
| 1590 // FIXME: We need a way to propagate insecure requests policy flags to | |
| 1591 // out-of-process frames. For now, we'll always use default behavior. | |
| 1592 if (!parentFrame->isLocalFrame()) | |
| 1593 return SecurityContext::InsecureRequestsDoNotUpgrade; | |
| 1594 | |
| 1595 ASSERT(toLocalFrame(parentFrame)->document()); | |
| 1596 return toLocalFrame(parentFrame)->document()->getInsecureRequestsPolicy(); | |
| 1597 } | 1582 } |
| 1598 | 1583 |
| 1599 SecurityContext::InsecureNavigationsSet* FrameLoader::insecureNavigationsToUpgra
de() const | 1584 SecurityContext::InsecureNavigationsSet* FrameLoader::insecureNavigationsToUpgra
de() const |
| 1600 { | 1585 { |
| 1601 ASSERT(m_frame); | 1586 ASSERT(m_frame); |
| 1602 Frame* parentFrame = m_frame->tree().parent(); | 1587 Frame* parentFrame = m_frame->tree().parent(); |
| 1603 if (!parentFrame) | 1588 if (!parentFrame) |
| 1604 return nullptr; | 1589 return nullptr; |
| 1605 | 1590 |
| 1606 // FIXME: We need a way to propagate insecure requests policy flags to | 1591 // FIXME: We need a way to propagate insecure requests policy flags to |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1624 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); | 1609 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); |
| 1625 return tracedValue; | 1610 return tracedValue; |
| 1626 } | 1611 } |
| 1627 | 1612 |
| 1628 inline void FrameLoader::takeObjectSnapshot() const | 1613 inline void FrameLoader::takeObjectSnapshot() const |
| 1629 { | 1614 { |
| 1630 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); | 1615 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); |
| 1631 } | 1616 } |
| 1632 | 1617 |
| 1633 } // namespace blink | 1618 } // namespace blink |
| OLD | NEW |