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

Unified Diff: chrome/browser/ui/browser_tab_strip_model_delegate.cc

Issue 1931793002: Stop using nested message loop for alert() and other JS dialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated comments and removed unused declaration Created 4 years, 7 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 | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/fast_unload_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_tab_strip_model_delegate.cc
diff --git a/chrome/browser/ui/browser_tab_strip_model_delegate.cc b/chrome/browser/ui/browser_tab_strip_model_delegate.cc
index fc60f8b8bdbc5ed7471ba080db5fe911bb88e1b2..37eac60d5209901a020c9847d95d05fb9f504da4 100644
--- a/chrome/browser/ui/browser_tab_strip_model_delegate.cc
+++ b/chrome/browser/ui/browser_tab_strip_model_delegate.cc
@@ -126,20 +126,12 @@ void BrowserTabStripModelDelegate::CreateHistoricalTab(
bool BrowserTabStripModelDelegate::RunUnloadListenerBeforeClosing(
content::WebContents* contents) {
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableFastUnload)) {
- return chrome::FastUnloadController::RunUnloadEventsHelper(contents);
- }
- return chrome::UnloadController::RunUnloadEventsHelper(contents);
+ return browser_->RunUnloadListenerBeforeClosing(contents);
}
bool BrowserTabStripModelDelegate::ShouldRunUnloadListenerBeforeClosing(
content::WebContents* contents) {
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableFastUnload)) {
- return chrome::FastUnloadController::ShouldRunUnloadEventsHelper(contents);
- }
- return chrome::UnloadController::ShouldRunUnloadEventsHelper(contents);
+ return browser_->ShouldRunUnloadListenerBeforeClosing(contents);
}
bool BrowserTabStripModelDelegate::CanBookmarkAllTabs() const {
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/fast_unload_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698