#include "content/public/browser/notification_service.h"
#if defined(OS_CHROMEOS)
-#include "ash/multi_profile_uma.h"
-#include "ash/session_state_delegate.h"
#include "base/sys_info.h"
#include "chrome/browser/chromeos/boot_times_loader.h"
#include "chrome/browser/chromeos/login/user_manager.h"
// If there are no browsers and closing the last browser would quit the
// application, send the APP_TERMINATING action here. Otherwise, it will be
// sent by RemoveBrowser() when the last browser has closed.
- if (browser_shutdown::ShuttingDownWithoutClosingBrowsers() ||
- (chrome::GetTotalBrowserCount() == 0 &&
- (browser_shutdown::IsTryingToQuit() || !chrome::WillKeepAlive()))) {
+ if (chrome::GetTotalBrowserCount() == 0 &&
+ (browser_shutdown::IsTryingToQuit() || !chrome::WillKeepAlive())) {
// Tell everyone that we are shutting down.
browser_shutdown::SetTryingToQuit(true);
const char kLogoutStarted[] = "logout-started";
chromeos::BootTimesLoader::Get()->RecordCurrentStats(kLogoutStarted);
- // Since we are shutting down now we should record how many users have joined
- // the session since session start.
- ash::MultiProfileUMA::RecordUserCount(
- ash::Shell::GetInstance()->session_state_delegate()->
- NumberOfLoggedInUsers());
-
// Login screen should show up in owner's locale.
PrefService* state = g_browser_process->local_state();
if (state) {
pref_service->SetBoolean(prefs::kWasRestarted, true);
#if defined(OS_CHROMEOS)
+ chromeos::BootTimesLoader::Get()->set_restart_requested();
+
DCHECK(!g_send_stop_request_to_session_manager);
// Make sure we don't send stop request to the session manager.
g_send_stop_request_to_session_manager = false;
content::ImmediateShutdownAndExitProcess();
}
-void StartKeepAlive() {
+void IncrementKeepAliveCount() {
// Increment the browser process refcount as long as we're keeping the
// application alive.
if (!WillKeepAlive())
++g_keep_alive_count;
}
-void EndKeepAlive() {
+void DecrementKeepAliveCount() {
DCHECK_GT(g_keep_alive_count, 0);
--g_keep_alive_count;
bool ShouldStartShutdown(Browser* browser) {
if (BrowserList::GetInstance(browser->host_desktop_type())->size() > 1)
return false;
-#if defined(OS_WIN) && defined(USE_AURA)
+#if defined(OS_WIN)
// On Windows 8 the desktop and ASH environments could be active
// at the same time.
// We should not start the shutdown process in the following cases:-