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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2808953002: Revert of Followup comments from r460581. (Closed)
Patch Set: manual merge Created 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 7f45ab817ae157f7ba283b6ff1d8377b1b87c5af..534192cd840cb46243a8874fea4ee6b5fe56b4d5 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1495,12 +1495,10 @@ void WebContentsImpl::WasUnOccluded() {
bool WebContentsImpl::NeedToFireBeforeUnload() {
// TODO(creis): Should we fire even for interstitial pages?
- // TODO(nasko): it's confusing that this method, per comments and tests that
- // depend on this behavior, needs to check unload handlers as well.
return WillNotifyDisconnection() && !ShowingInterstitialPage() &&
!GetRenderViewHost()->SuddenTerminationAllowed() &&
(GetMainFrame()->ShouldDispatchBeforeUnload() ||
- GetMainFrame()->HasUnloadHandler());
+ GetMainFrame()->ShouldDispatchUnload());
}
void WebContentsImpl::DispatchBeforeUnload() {

Powered by Google App Engine
This is Rietveld 408576698