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

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

Issue 1873583002: Move isNavigationAllowed() check to main entry point for loads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 8 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
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 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 return policy; 881 return policy;
882 } 882 }
883 883
884 void FrameLoader::load(const FrameLoadRequest& passedRequest, FrameLoadType fram eLoadType, 884 void FrameLoader::load(const FrameLoadRequest& passedRequest, FrameLoadType fram eLoadType,
885 HistoryItem* historyItem, HistoryLoadType historyLoadType) 885 HistoryItem* historyItem, HistoryLoadType historyLoadType)
886 { 886 {
887 ASSERT(m_frame->document()); 887 ASSERT(m_frame->document());
888 888
889 RefPtrWillBeRawPtr<LocalFrame> protect(m_frame.get()); 889 RefPtrWillBeRawPtr<LocalFrame> protect(m_frame.get());
890 890
891 if (!m_frame->isNavigationAllowed())
892 return;
893
891 if (m_inStopAllLoaders) 894 if (m_inStopAllLoaders)
892 return; 895 return;
893 896
894 if (m_frame->page()->defersLoading() && isBackForwardLoadType(frameLoadType) ) { 897 if (m_frame->page()->defersLoading() && isBackForwardLoadType(frameLoadType) ) {
895 m_deferredHistoryLoad = DeferredHistoryLoad::create(passedRequest.resour ceRequest(), historyItem, frameLoadType, historyLoadType); 898 m_deferredHistoryLoad = DeferredHistoryLoad::create(passedRequest.resour ceRequest(), historyItem, frameLoadType, historyLoadType);
896 return; 899 return;
897 } 900 }
898 901
899 FrameLoadRequest request(passedRequest); 902 FrameLoadRequest request(passedRequest);
900 request.resourceRequest().setHasUserGesture(UserGestureIndicator::processing UserGesture()); 903 request.resourceRequest().setHasUserGesture(UserGestureIndicator::processing UserGesture());
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
1584 // FIXME: We need a way to propagate insecure requests policy flags to 1587 // FIXME: We need a way to propagate insecure requests policy flags to
1585 // out-of-process frames. For now, we'll always use default behavior. 1588 // out-of-process frames. For now, we'll always use default behavior.
1586 if (!parentFrame->isLocalFrame()) 1589 if (!parentFrame->isLocalFrame())
1587 return nullptr; 1590 return nullptr;
1588 1591
1589 ASSERT(toLocalFrame(parentFrame)->document()); 1592 ASSERT(toLocalFrame(parentFrame)->document());
1590 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ; 1593 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ;
1591 } 1594 }
1592 1595
1593 } // namespace blink 1596 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/core/loader/NavigationScheduler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698