| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "chrome/browser/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" | 
| 6 | 6 | 
| 7 #include <stddef.h> | 7 #include <stddef.h> | 
| 8 #include <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include <set> | 10 #include <set> | 
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 169 #include "ui/base/l10n/l10n_util.h" | 169 #include "ui/base/l10n/l10n_util.h" | 
| 170 #include "ui/base/layout.h" | 170 #include "ui/base/layout.h" | 
| 171 #include "ui/base/material_design/material_design_controller.h" | 171 #include "ui/base/material_design/material_design_controller.h" | 
| 172 #include "ui/base/resource/resource_bundle.h" | 172 #include "ui/base/resource/resource_bundle.h" | 
| 173 | 173 | 
| 174 #if defined(OS_ANDROID) | 174 #if defined(OS_ANDROID) | 
| 175 #include "chrome/browser/android/offline_pages/offline_page_info_handler.h" | 175 #include "chrome/browser/android/offline_pages/offline_page_info_handler.h" | 
| 176 #include "chrome/browser/metrics/thread_watcher_android.h" | 176 #include "chrome/browser/metrics/thread_watcher_android.h" | 
| 177 #include "ui/base/resource/resource_bundle_android.h" | 177 #include "ui/base/resource/resource_bundle_android.h" | 
| 178 #else | 178 #else | 
|  | 179 #include "chrome/browser/features.h" | 
| 179 #include "chrome/browser/feedback/feedback_profile_observer.h" | 180 #include "chrome/browser/feedback/feedback_profile_observer.h" | 
|  | 181 #include "chrome/browser/lifetime/application_lifetime.h" | 
| 180 #endif  // defined(OS_ANDROID) | 182 #endif  // defined(OS_ANDROID) | 
| 181 | 183 | 
| 182 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 184 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 
| 183 #include "chrome/browser/first_run/upgrade_util_linux.h" | 185 #include "chrome/browser/first_run/upgrade_util_linux.h" | 
| 184 #endif  // defined(OS_LINUX) && !defined(OS_CHROMEOS) | 186 #endif  // defined(OS_LINUX) && !defined(OS_CHROMEOS) | 
| 185 | 187 | 
| 186 #if defined(OS_CHROMEOS) | 188 #if defined(OS_CHROMEOS) | 
| 187 #include "ash/common/material_design/material_design_controller.h" | 189 #include "ash/common/material_design/material_design_controller.h" | 
| 188 #include "chrome/browser/chromeos/settings/cros_settings.h" | 190 #include "chrome/browser/chromeos/settings/cros_settings.h" | 
| 189 #include "chromeos/chromeos_switches.h" | 191 #include "chromeos/chromeos_switches.h" | 
| (...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1975   DCHECK(base::MessageLoopForUI::IsCurrent()); | 1977   DCHECK(base::MessageLoopForUI::IsCurrent()); | 
| 1976   base::RunLoop run_loop; | 1978   base::RunLoop run_loop; | 
| 1977 | 1979 | 
| 1978   performance_monitor::PerformanceMonitor::GetInstance()->StartGatherCycle(); | 1980   performance_monitor::PerformanceMonitor::GetInstance()->StartGatherCycle(); | 
| 1979 | 1981 | 
| 1980   metrics::MetricsService::SetExecutionPhase( | 1982   metrics::MetricsService::SetExecutionPhase( | 
| 1981       metrics::MetricsService::MAIN_MESSAGE_LOOP_RUN, | 1983       metrics::MetricsService::MAIN_MESSAGE_LOOP_RUN, | 
| 1982       g_browser_process->local_state()); | 1984       g_browser_process->local_state()); | 
| 1983   run_loop.Run(); | 1985   run_loop.Run(); | 
| 1984 | 1986 | 
|  | 1987   if (base::FeatureList::IsEnabled(chrome::kDesktopFastShutdown)) { | 
|  | 1988     // Experiment to determine the impact of always taking the quick exit path. | 
|  | 1989     // There is no returning from this call as it terminates the process. | 
|  | 1990     chrome::SessionEnding(); | 
|  | 1991   } | 
|  | 1992 | 
| 1985   return true; | 1993   return true; | 
| 1986 #endif  // defined(OS_ANDROID) | 1994 #endif  // defined(OS_ANDROID) | 
| 1987 } | 1995 } | 
| 1988 | 1996 | 
| 1989 void ChromeBrowserMainParts::PostMainMessageLoopRun() { | 1997 void ChromeBrowserMainParts::PostMainMessageLoopRun() { | 
| 1990   TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostMainMessageLoopRun"); | 1998   TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostMainMessageLoopRun"); | 
| 1991 #if defined(OS_ANDROID) | 1999 #if defined(OS_ANDROID) | 
| 1992   // Chrome on Android does not use default MessageLoop. It has its own | 2000   // Chrome on Android does not use default MessageLoop. It has its own | 
| 1993   // Android specific MessageLoop | 2001   // Android specific MessageLoop | 
| 1994   NOTREACHED(); | 2002   NOTREACHED(); | 
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2093   chromeos::CrosSettings::Shutdown(); | 2101   chromeos::CrosSettings::Shutdown(); | 
| 2094 #endif  // defined(OS_CHROMEOS) | 2102 #endif  // defined(OS_CHROMEOS) | 
| 2095 #endif  // defined(OS_ANDROID) | 2103 #endif  // defined(OS_ANDROID) | 
| 2096 } | 2104 } | 
| 2097 | 2105 | 
| 2098 // Public members: | 2106 // Public members: | 
| 2099 | 2107 | 
| 2100 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2108 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 
| 2101   chrome_extra_parts_.push_back(parts); | 2109   chrome_extra_parts_.push_back(parts); | 
| 2102 } | 2110 } | 
| OLD | NEW | 
|---|