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

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

Issue 10829007: Revert 148281 - Remove details from BROWSER_CLOSING and BROWSER_CLOSED notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/profiles/profile_manager.cc ('k') | chrome/browser/ui/browser_list_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
===================================================================
--- chrome/browser/ui/browser.cc (revision 148288)
+++ chrome/browser/ui/browser.cc (working copy)
@@ -591,6 +591,8 @@
if (!ShouldCloseWindow())
return;
+ bool exiting = false;
+
// Application should shutdown on last window close if the user is explicitly
// trying to quit, or if there is nothing keeping the browser alive (such as
// AppController on the Mac, or BackgroundContentsService for background
@@ -598,8 +600,10 @@
bool should_quit_if_last_browser =
browser_shutdown::IsTryingToQuit() || !browser::WillKeepAlive();
- if (should_quit_if_last_browser && BrowserList::size() == 1)
+ if (should_quit_if_last_browser && BrowserList::size() == 1) {
browser_shutdown::OnShutdownStarting(browser_shutdown::WINDOW_CLOSE);
+ exiting = true;
+ }
// Don't use GetForProfileIfExisting here, we want to force creation of the
// session service so that user can restore what was open.
@@ -623,7 +627,7 @@
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BROWSER_CLOSING,
content::Source<Browser>(this),
- content::NotificationService::NoDetails());
+ content::Details<bool>(&exiting));
chrome::CloseAllTabs(this);
}
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/ui/browser_list_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698