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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/FrameLoader.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 { 1396 {
1397 Frame* parentFrame = m_frame->tree().parent(); 1397 Frame* parentFrame = m_frame->tree().parent();
1398 if (!parentFrame) 1398 if (!parentFrame)
1399 return false; 1399 return false;
1400 1400
1401 // FIXME: We need a way to propagate strict mixed content checking flags to 1401 // FIXME: We need a way to propagate strict mixed content checking flags to
1402 // out-of-process frames. For now, we'll always enforce. 1402 // out-of-process frames. For now, we'll always enforce.
1403 if (!parentFrame->isLocalFrame()) 1403 if (!parentFrame->isLocalFrame())
1404 return true; 1404 return true;
1405 1405
1406 ASSERT(toLocalFrame(parentFrame)->document());
1406 return toLocalFrame(parentFrame)->document()->shouldEnforceStrictMixedConten tChecking(); 1407 return toLocalFrame(parentFrame)->document()->shouldEnforceStrictMixedConten tChecking();
1407 } 1408 }
1408 1409
1409 SecurityContext::InsecureRequestsPolicy FrameLoader::insecureRequestsPolicy() co nst 1410 SecurityContext::InsecureRequestsPolicy FrameLoader::insecureRequestsPolicy() co nst
1410 { 1411 {
1411 Frame* parentFrame = m_frame->tree().parent(); 1412 Frame* parentFrame = m_frame->tree().parent();
1412 if (!parentFrame) 1413 if (!parentFrame)
1413 return SecurityContext::InsecureRequestsDoNotUpgrade; 1414 return SecurityContext::InsecureRequestsDoNotUpgrade;
1414 1415
1415 // FIXME: We need a way to propagate insecure requests policy flags to 1416 // FIXME: We need a way to propagate insecure requests policy flags to
1416 // out-of-process frames. For now, we'll always use default behavior. 1417 // out-of-process frames. For now, we'll always use default behavior.
1417 if (!parentFrame->isLocalFrame()) 1418 if (!parentFrame->isLocalFrame())
1418 return SecurityContext::InsecureRequestsDoNotUpgrade; 1419 return SecurityContext::InsecureRequestsDoNotUpgrade;
1419 1420
1421 ASSERT(toLocalFrame(parentFrame)->document());
1420 return toLocalFrame(parentFrame)->document()->insecureRequestsPolicy(); 1422 return toLocalFrame(parentFrame)->document()->insecureRequestsPolicy();
1421 } 1423 }
1422 1424
1425 SecurityContext::InsecureNavigationsSet* FrameLoader::insecureNavigationsToUpgra de() const
1426 {
1427 ASSERT(m_frame);
1428 Frame* parentFrame = m_frame->tree().parent();
1429 if (!parentFrame)
1430 return nullptr;
1431
1432 // FIXME: We need a way to propagate insecure requests policy flags to
1433 // out-of-process frames. For now, we'll always use default behavior.
1434 if (!parentFrame->isLocalFrame())
1435 return nullptr;
1436
1437 ASSERT(toLocalFrame(parentFrame)->document());
1438 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ;
1439 }
1440
1423 } // namespace blink 1441 } // namespace blink
OLDNEW
« 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