| Index: chrome/browser/ui/browser.cc
|
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
| index 3abed6c03e97efdec77f487d398acf3f4d424355..7c0df45d81e0872614ef329b493c3bbf3e41d46b 100644
|
| --- a/chrome/browser/ui/browser.cc
|
| +++ b/chrome/browser/ui/browser.cc
|
| @@ -643,28 +643,29 @@ void Browser::FormatTitleForDisplay(base::string16* title) {
|
| bool Browser::ShouldCloseWindow() {
|
| if (!CanCloseWithInProgressDownloads())
|
| return false;
|
| -
|
| if (IsFastTabUnloadEnabled())
|
| return fast_unload_controller_->ShouldCloseWindow();
|
| return unload_controller_->ShouldCloseWindow();
|
| }
|
|
|
| -bool Browser::CallBeforeUnloadHandlers(
|
| +bool Browser::TryToCloseWindow(
|
| + bool skip_before_unload_event,
|
| const base::Callback<void(bool)>& on_close_confirmed) {
|
| cancel_download_confirmation_state_ = RESPONSE_RECEIVED;
|
| if (IsFastTabUnloadEnabled()) {
|
| - return fast_unload_controller_->CallBeforeUnloadHandlers(
|
| - on_close_confirmed);
|
| + return fast_unload_controller_->TryToCloseWindow(skip_before_unload_event,
|
| + on_close_confirmed);
|
| }
|
| - return unload_controller_->CallBeforeUnloadHandlers(on_close_confirmed);
|
| + return unload_controller_->TryToCloseWindow(skip_before_unload_event,
|
| + on_close_confirmed);
|
| }
|
|
|
| -void Browser::ResetBeforeUnloadHandlers() {
|
| +void Browser::ResetCloseWindow() {
|
| cancel_download_confirmation_state_ = NOT_PROMPTED;
|
| if (IsFastTabUnloadEnabled())
|
| - fast_unload_controller_->ResetBeforeUnloadHandlers();
|
| + fast_unload_controller_->ResetCloseWindow();
|
| else
|
| - unload_controller_->ResetBeforeUnloadHandlers();
|
| + unload_controller_->ResetCloseWindow();
|
| }
|
|
|
| bool Browser::HasCompletedUnloadProcessing() const {
|
|
|