diff options
author | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-25 02:32:21 +0000 |
---|---|---|
committer | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-25 02:32:21 +0000 |
commit | 0febfed1e52bfd1b3a0e0192bbd2aff5799f5153 (patch) | |
tree | af5be7ed22f362a2c60977034e72e13bc48be589 /chrome/browser/ui/browser_list_impl.cc | |
parent | 694a591967a3318ecbc09b9ba8b895a64d564462 (diff) | |
download | chromium_src-0febfed1e52bfd1b3a0e0192bbd2aff5799f5153.zip chromium_src-0febfed1e52bfd1b3a0e0192bbd2aff5799f5153.tar.gz chromium_src-0febfed1e52bfd1b3a0e0192bbd2aff5799f5153.tar.bz2 |
Remove details from BROWSER_CLOSING and BROWSER_CLOSED notifications.
The details was a boolean indicating whether this is the last browser window closing. As part of this change the logic for saving pinned tabs has been changed to not use the boolean in the details, and has been updated to handle the case where a user exit or closing of the last window is cancelled by an onbeforeunload event.
Also as part of this change, both the pinned tab and multi profile features have been updated to handle cases of the browser process not being closed due to background mode or (in the future) packaged apps, and then more browser windows being opened.
BUG=None
TEST=Test shutdown
Review URL: https://chromiumcodereview.appspot.com/10800031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148281 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/browser_list_impl.cc')
-rw-r--r-- | chrome/browser/ui/browser_list_impl.cc | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/chrome/browser/ui/browser_list_impl.cc b/chrome/browser/ui/browser_list_impl.cc index 5105928..63b6e69 100644 --- a/chrome/browser/ui/browser_list_impl.cc +++ b/chrome/browser/ui/browser_list_impl.cc @@ -70,28 +70,10 @@ void BrowserListImpl::AddBrowser(Browser* browser) { void BrowserListImpl::RemoveBrowser(Browser* browser) { RemoveBrowserFrom(browser, &last_active_browsers_); - // Many UI tests rely on closing the last browser window quitting the - // application. - // Mac: Closing all windows does not indicate quitting the application. Lie - // for now and ignore behavior outside of unit tests. - // ChromeOS: Force closing last window to close app with flag. - // TODO(andybons | pkotwicz): Fix the UI tests to Do The Right Thing. -#if defined(OS_CHROMEOS) - bool closing_app; - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDisableZeroBrowsersOpenForTests)) - closing_app = (browsers_.size() == 1); - else - closing_app = (browsers_.size() == 1 && - browser_shutdown::IsTryingToQuit()); -#else - bool closing_app = (browsers_.size() == 1); -#endif // OS_CHROMEOS - content::NotificationService::current()->Notify( chrome::NOTIFICATION_BROWSER_CLOSED, content::Source<Browser>(browser), - content::Details<bool>(&closing_app)); + content::NotificationService::NoDetails()); RemoveBrowserFrom(browser, &browsers_); |