| Index: chrome/browser/lifetime/application_lifetime.cc
|
| diff --git a/chrome/browser/lifetime/application_lifetime.cc b/chrome/browser/lifetime/application_lifetime.cc
|
| index 1986d1b3a5c44e9159c4943b7a1919cb8b1c3d0a..4fa9a1831c5ed87d970f67139c3fdb3c1f68039c 100644
|
| --- a/chrome/browser/lifetime/application_lifetime.cc
|
| +++ b/chrome/browser/lifetime/application_lifetime.cc
|
| @@ -5,14 +5,12 @@
|
| #include "chrome/browser/lifetime/application_lifetime.h"
|
|
|
| #include "base/bind.h"
|
| -#include "base/command_line.h"
|
| #include "base/logging.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/prefs/pref_service.h"
|
| #include "base/process/process.h"
|
| #include "base/process/process_handle.h"
|
| -#include "base/trace_event/trace_event.h"
|
| #include "build/build_config.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/browser_process_platform_part.h"
|
| @@ -31,9 +29,7 @@
|
| #include "chrome/browser/ui/tabs/tab_strip_model.h"
|
| #include "chrome/browser/ui/user_manager.h"
|
| #include "chrome/common/chrome_constants.h"
|
| -#include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/pref_names.h"
|
| -#include "components/tracing/tracing_switches.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/navigation_details.h"
|
| #include "content/public/browser/notification_service.h"
|
| @@ -51,10 +47,6 @@
|
| #include "components/browser_watcher/exit_funnel_win.h"
|
| #endif
|
|
|
| -#if defined(USE_ASH)
|
| -#include "ash/shell.h"
|
| -#endif
|
| -
|
| namespace chrome {
|
| namespace {
|
|
|
| @@ -149,7 +141,7 @@ void CloseAllBrowsers() {
|
|
|
| void AttemptUserExit() {
|
| #if defined(OS_CHROMEOS)
|
| - StartShutdownTracing();
|
| + browser_shutdown::StartShutdownTracing();
|
| chromeos::BootTimesRecorder::Get()->AddLogoutTimeMarker("LogoutStarted",
|
| false);
|
|
|
| @@ -181,19 +173,6 @@ void AttemptUserExit() {
|
| #endif
|
| }
|
|
|
| -void StartShutdownTracing() {
|
| - const base::CommandLine& command_line =
|
| - *base::CommandLine::ForCurrentProcess();
|
| - if (command_line.HasSwitch(switches::kTraceShutdown)) {
|
| - base::trace_event::TraceConfig trace_config(
|
| - command_line.GetSwitchValueASCII(switches::kTraceShutdown), "");
|
| - base::trace_event::TraceLog::GetInstance()->SetEnabled(
|
| - trace_config,
|
| - base::trace_event::TraceLog::RECORDING_MODE);
|
| - }
|
| - TRACE_EVENT0("shutdown", "StartShutdownTracing");
|
| -}
|
| -
|
| // The Android implementation is in application_lifetime_android.cc
|
| #if !defined(OS_ANDROID)
|
| void AttemptRestart() {
|
| @@ -405,25 +384,6 @@ void OnAppExiting() {
|
| HandleAppExitingForPlatform();
|
| }
|
|
|
| -bool ShouldStartShutdown(Browser* browser) {
|
| - if (BrowserList::GetInstance(browser->host_desktop_type())->size() > 1)
|
| - return false;
|
| -#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:-
|
| - // 1. If the desktop type of the browser going away is ASH and there
|
| - // are browser windows open in the desktop.
|
| - // 2. If the desktop type of the browser going away is desktop and the ASH
|
| - // environment is still active.
|
| - if (browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_NATIVE)
|
| - return !ash::Shell::HasInstance();
|
| - else if (browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH)
|
| - return BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_NATIVE)->empty();
|
| -#endif
|
| - return true;
|
| -}
|
| -
|
| void DisableShutdownForTesting(bool disable_shutdown_for_testing) {
|
| g_disable_shutdown_for_testing = disable_shutdown_for_testing;
|
| if (!g_disable_shutdown_for_testing && !WillKeepAlive())
|
|
|