Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index 1e36475c350b28db8a1a8743fd5d8737fc30418f..5e80a7cbf702631a51f68e69e2389d88dca3ad04 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -95,6 +95,7 @@ |
#include "chrome/browser/ui/browser_instant_controller.h" |
#include "chrome/browser/ui/browser_iterator.h" |
#include "chrome/browser/ui/browser_list.h" |
+#include "chrome/browser/ui/browser_list_impl.h" |
#include "chrome/browser/ui/browser_navigator.h" |
#include "chrome/browser/ui/browser_tab_contents.h" |
#include "chrome/browser/ui/browser_tab_restore_service_delegate.h" |
@@ -632,8 +633,10 @@ void Browser::OnWindowClosing() { |
bool should_quit_if_last_browser = |
browser_shutdown::IsTryingToQuit() || !chrome::WillKeepAlive(); |
- if (should_quit_if_last_browser && BrowserList::size() == 1) |
+ if (should_quit_if_last_browser && |
+ chrome::BrowserListImpl::GetInstance(host_desktop_type_)->size() == 1) { |
browser_shutdown::OnShutdownStarting(browser_shutdown::WINDOW_CLOSE); |
+ } |
// Don't use GetForProfileIfExisting here, we want to force creation of the |
// session service so that user can restore what was open. |