| Index: chrome/browser/ui/browser_list.cc
|
| diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc
|
| index 92107074fb28d1100b1a980a0d4a4106732073d2..2d25e70517052d1341274691e6173c2b2fb8940f 100644
|
| --- a/chrome/browser/ui/browser_list.cc
|
| +++ b/chrome/browser/ui/browser_list.cc
|
| @@ -165,7 +165,8 @@ void BrowserList::TryToCloseBrowserList(const BrowserVector& browsers_to_close,
|
| }
|
| }
|
|
|
| - on_close_success.Run(profile_path);
|
| + if (on_close_success)
|
| + on_close_success.Run(profile_path);
|
|
|
| for (Browser* b : browsers_to_close) {
|
| // BeforeUnload handlers may close browser windows, so we need to explicitly
|
| @@ -197,7 +198,8 @@ void BrowserList::PostTryToCloseBrowserWindow(
|
| it != browsers_to_close.end(); ++it) {
|
| (*it)->ResetTryToCloseWindow();
|
| }
|
| - on_close_aborted.Run(profile_path);
|
| + if (on_close_aborted)
|
| + on_close_aborted.Run(profile_path);
|
| }
|
| }
|
|
|
|
|