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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 282093012: Remove dependencies of Metrics{Service,Log} on g_browser_process->local_state() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android compile fix Created 6 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 | « no previous file | chrome/browser/metrics/metrics_log.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 2eb7b8a52acbb4e2ef4229ba3bd8d772fe69e1d9..e1b33d84357155502bb4647a72d6edb76e232ad6 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1221,7 +1221,8 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Profile creation ----------------------------------------------------------
- MetricsService::SetExecutionPhase(MetricsService::CREATE_PROFILE);
+ MetricsService::SetExecutionPhase(MetricsService::CREATE_PROFILE,
+ g_browser_process->local_state());
profile_ = CreatePrimaryProfile(parameters(),
user_data_dir_,
parsed_command_line());
@@ -1395,7 +1396,8 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Start watching for hangs during startup. We disarm this hang detector when
// ThreadWatcher takes over or when browser is shutdown or when
// startup_watcher_ is deleted.
- MetricsService::SetExecutionPhase(MetricsService::STARTUP_TIMEBOMB_ARM);
+ MetricsService::SetExecutionPhase(MetricsService::STARTUP_TIMEBOMB_ARM,
+ g_browser_process->local_state());
startup_watcher_->Arm(base::TimeDelta::FromSeconds(300));
// On mobile, need for clean shutdown arises only when the application comes
@@ -1403,7 +1405,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// http://crbug.com/179143
#if !defined(OS_ANDROID)
// Start watching for a hang.
- MetricsService::LogNeedForCleanShutdown();
+ MetricsService::LogNeedForCleanShutdown(g_browser_process->local_state());
#endif
#if defined(ENABLE_FULL_PRINTING)
@@ -1417,7 +1419,8 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
#endif
// Start watching all browser threads for responsiveness.
- MetricsService::SetExecutionPhase(MetricsService::THREAD_WATCHER_START);
+ MetricsService::SetExecutionPhase(MetricsService::THREAD_WATCHER_START,
+ g_browser_process->local_state());
ThreadWatcherList::StartWatchingAll(parsed_command_line());
#if defined(OS_ANDROID)
@@ -1579,7 +1582,8 @@ bool ChromeBrowserMainParts::MainMessageLoopRun(int* result_code) {
performance_monitor::PerformanceMonitor::GetInstance()->StartGatherCycle();
- MetricsService::SetExecutionPhase(MetricsService::MAIN_MESSAGE_LOOP_RUN);
+ MetricsService::SetExecutionPhase(MetricsService::MAIN_MESSAGE_LOOP_RUN,
+ g_browser_process->local_state());
run_loop.Run();
return true;
@@ -1596,7 +1600,8 @@ void ChromeBrowserMainParts::PostMainMessageLoopRun() {
// Start watching for jank during shutdown. It gets disarmed when
// |shutdown_watcher_| object is destructed.
- MetricsService::SetExecutionPhase(MetricsService::SHUTDOWN_TIMEBOMB_ARM);
+ MetricsService::SetExecutionPhase(MetricsService::SHUTDOWN_TIMEBOMB_ARM,
+ g_browser_process->local_state());
shutdown_watcher_->Arm(base::TimeDelta::FromSeconds(300));
// Disarm the startup hang detector time bomb if it is still Arm'ed.
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698