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

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

Issue 2943693002: Fix TryToCloseBrowserList not checking for null callbacks (Closed)
Patch Set: Incorporate treib@'s comment change into the CL. Created 3 years, 6 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_list.h ('k') | chrome/browser/unload_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « chrome/browser/ui/browser_list.h ('k') | chrome/browser/unload_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698