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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 1489253002: Plumb document's strict mixed content checking for RemoteFrames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nasko comments Created 5 years 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) 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 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 flags |= parentFrame->securityContext()->sandboxFlags(); 1510 flags |= parentFrame->securityContext()->sandboxFlags();
1511 return flags; 1511 return flags;
1512 } 1512 }
1513 1513
1514 bool FrameLoader::shouldEnforceStrictMixedContentChecking() const 1514 bool FrameLoader::shouldEnforceStrictMixedContentChecking() const
1515 { 1515 {
1516 Frame* parentFrame = m_frame->tree().parent(); 1516 Frame* parentFrame = m_frame->tree().parent();
1517 if (!parentFrame) 1517 if (!parentFrame)
1518 return false; 1518 return false;
1519 1519
1520 // FIXME: We need a way to propagate strict mixed content checking flags to 1520 return parentFrame->securityContext()->shouldEnforceStrictMixedContentChecki ng();
1521 // out-of-process frames. For now, we'll always enforce.
1522 if (!parentFrame->isLocalFrame())
1523 return true;
1524
1525 ASSERT(toLocalFrame(parentFrame)->document());
1526 return toLocalFrame(parentFrame)->document()->shouldEnforceStrictMixedConten tChecking();
1527 } 1521 }
1528 1522
1529 SecurityContext::InsecureRequestsPolicy FrameLoader::insecureRequestsPolicy() co nst 1523 SecurityContext::InsecureRequestsPolicy FrameLoader::insecureRequestsPolicy() co nst
1530 { 1524 {
1531 Frame* parentFrame = m_frame->tree().parent(); 1525 Frame* parentFrame = m_frame->tree().parent();
1532 if (!parentFrame) 1526 if (!parentFrame)
1533 return SecurityContext::InsecureRequestsDoNotUpgrade; 1527 return SecurityContext::InsecureRequestsDoNotUpgrade;
1534 1528
1535 // FIXME: We need a way to propagate insecure requests policy flags to 1529 // FIXME: We need a way to propagate insecure requests policy flags to
1536 // out-of-process frames. For now, we'll always use default behavior. 1530 // out-of-process frames. For now, we'll always use default behavior.
(...skipping 14 matching lines...) Expand all
1551 // FIXME: We need a way to propagate insecure requests policy flags to 1545 // FIXME: We need a way to propagate insecure requests policy flags to
1552 // out-of-process frames. For now, we'll always use default behavior. 1546 // out-of-process frames. For now, we'll always use default behavior.
1553 if (!parentFrame->isLocalFrame()) 1547 if (!parentFrame->isLocalFrame())
1554 return nullptr; 1548 return nullptr;
1555 1549
1556 ASSERT(toLocalFrame(parentFrame)->document()); 1550 ASSERT(toLocalFrame(parentFrame)->document());
1557 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ; 1551 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ;
1558 } 1552 }
1559 1553
1560 } // namespace blink 1554 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/SecurityContext.cpp ('k') | third_party/WebKit/Source/core/loader/FrameLoaderClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698