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

Unified Diff: chrome/browser/lifetime/browser_close_manager.cc

Issue 2812743002: Revert of Keep track in the browser of which frames have onunload and onbeforeunload handlers. (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
« no previous file with comments | « no previous file | content/browser/browser_side_navigation_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/lifetime/browser_close_manager.cc
diff --git a/chrome/browser/lifetime/browser_close_manager.cc b/chrome/browser/lifetime/browser_close_manager.cc
index 484a1f3bf0a4cc5dee0e90797e7bd4694e84b924..d8a943c1ab55a4172d9b0c66e9a8de2909183c1c 100644
--- a/chrome/browser/lifetime/browser_close_manager.cc
+++ b/chrome/browser/lifetime/browser_close_manager.cc
@@ -72,16 +72,13 @@ void BrowserCloseManager::TryToCloseBrowsers() {
// OnBrowserReportCloseable with the result. If the user confirms the close,
// this will trigger TryToCloseBrowsers to try again.
for (auto* browser : *BrowserList::GetInstance()) {
- // Set current_browser_ here since if there are no unload handlers, it might
- // get used synchronously inside TryToCloseWindow.
- current_browser_ = browser;
if (browser->TryToCloseWindow(
false,
base::Bind(&BrowserCloseManager::OnBrowserReportCloseable, this))) {
+ current_browser_ = browser;
return;
}
}
- current_browser_ = NULL;
CheckForDownloadsInProgress();
}
« no previous file with comments | « no previous file | content/browser/browser_side_navigation_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698