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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | 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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 FrameLoadRequest request(&originDocument, url); 285 FrameLoadRequest request(&originDocument, url);
286 request.resourceRequest().setHasUserGesture(userGestureStatus == UserGes tureStatus::Active); 286 request.resourceRequest().setHasUserGesture(userGestureStatus == UserGes tureStatus::Active);
287 m_loader.load(request); 287 m_loader.load(request);
288 } else { 288 } else {
289 m_navigationScheduler->scheduleLocationChange(&originDocument, url.strin g(), replaceCurrentItem); 289 m_navigationScheduler->scheduleLocationChange(&originDocument, url.strin g(), replaceCurrentItem);
290 } 290 }
291 } 291 }
292 292
293 void LocalFrame::navigate(const FrameLoadRequest& request) 293 void LocalFrame::navigate(const FrameLoadRequest& request)
294 { 294 {
295 if (!isNavigationAllowed())
296 return;
297 m_loader.load(request); 295 m_loader.load(request);
298 } 296 }
299 297
300 void LocalFrame::reload(FrameLoadType loadType, ClientRedirectPolicy clientRedir ectPolicy) 298 void LocalFrame::reload(FrameLoadType loadType, ClientRedirectPolicy clientRedir ectPolicy)
301 { 299 {
302 ASSERT(loadType == FrameLoadTypeReload || loadType == FrameLoadTypeReloadFro mOrigin); 300 ASSERT(loadType == FrameLoadTypeReload || loadType == FrameLoadTypeReloadFro mOrigin);
303 ASSERT(clientRedirectPolicy == NotClientRedirect || loadType == FrameLoadTyp eReload); 301 ASSERT(clientRedirectPolicy == NotClientRedirect || loadType == FrameLoadTyp eReload);
304 if (clientRedirectPolicy == NotClientRedirect) { 302 if (clientRedirectPolicy == NotClientRedirect) {
305 if (!m_loader.currentItem()) 303 if (!m_loader.currentItem())
306 return; 304 return;
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 { 875 {
878 m_frame->disableNavigation(); 876 m_frame->disableNavigation();
879 } 877 }
880 878
881 FrameNavigationDisabler::~FrameNavigationDisabler() 879 FrameNavigationDisabler::~FrameNavigationDisabler()
882 { 880 {
883 m_frame->enableNavigation(); 881 m_frame->enableNavigation();
884 } 882 }
885 883
886 } // namespace blink 884 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698