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

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

Issue 10409022: Move application lifetime functionality off BrowserList. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/sync/test/integration/sync_test.cc ('k') | chrome/browser/ui/browser_list.h » ('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 137868)
+++ chrome/browser/ui/browser.cc (working copy)
@@ -65,6 +65,7 @@
#include "chrome/browser/instant/instant_unload_handler.h"
#include "chrome/browser/intents/register_intent_handler_infobar_delegate.h"
#include "chrome/browser/intents/web_intents_util.h"
+#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/net/url_fixer_upper.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/browser/platform_util.h"
@@ -1203,7 +1204,7 @@
// AppController on the Mac, or BackgroundContentsService for background
// pages).
bool should_quit_if_last_browser =
- browser_shutdown::IsTryingToQuit() || !BrowserList::WillKeepAlive();
+ browser_shutdown::IsTryingToQuit() || !browser::WillKeepAlive();
if (should_quit_if_last_browser && BrowserList::size() == 1) {
browser_shutdown::OnShutdownStarting(browser_shutdown::WINDOW_CLOSE);
@@ -1789,7 +1790,7 @@
void Browser::Exit() {
content::RecordAction(UserMetricsAction("Exit"));
- BrowserList::AttemptUserExit();
+ browser::AttemptUserExit();
}
void Browser::BookmarkCurrentPage() {
@@ -3321,8 +3322,6 @@
// Note: This will be called several times if TabStripEmpty is called several
// times. This is because it does not close the window if tabs are
// still present.
- // NOTE: If you change to be immediate (no invokeLater) then you'll need to
- // update BrowserList::CloseAllBrowsers.
MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&Browser::CloseFrame, weak_factory_.GetWeakPtr()));
// Set is_attempting_to_close_browser_ here, so that extensions, etc, do not
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | chrome/browser/ui/browser_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698