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

Unified Diff: chrome/browser/metrics/metrics_service.h

Issue 28283002: Track execution phase of browser process when we log if the broswer has (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed jar's comments Created 7 years, 2 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 | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_service.h
diff --git a/chrome/browser/metrics/metrics_service.h b/chrome/browser/metrics/metrics_service.h
index a827a7e48ce5b9dd2549445b2a5a534b670d9c87..57c1b9a049107226e08b73a265b40712280eea97 100644
--- a/chrome/browser/metrics/metrics_service.h
+++ b/chrome/browser/metrics/metrics_service.h
@@ -74,6 +74,17 @@ class MetricsService
public net::URLFetcherDelegate,
public MetricsServiceBase {
public:
+ // The execution phase of the browser.
+ enum ExecutionPhase {
+ CLEAN_SHUTDOWN = 0,
+ START_METRICS_RECORDING = 100,
+ CREATE_PROFILE = 200,
+ STARTUP_TIMEBOMB_ARM = 300,
+ THREAD_WATCHER_START = 400,
+ MAIN_MESSAGE_LOOP_RUN = 500,
+ SHUTDOWN_TIMEBOMB_ARM = 600,
+ };
+
MetricsService();
virtual ~MetricsService();
@@ -164,6 +175,9 @@ class MetricsService
static void LogNeedForCleanShutdown();
#endif // defined(OS_ANDROID) || defined(OS_IOS)
+ static void SetExecutionPhase(ExecutionPhase execution_phase) {
+ execution_phase_ = execution_phase;
+ }
// Saves in the preferences if the crash report registration was successful.
// This count is eventually send via UMA logs.
void RecordBreakpadRegistration(bool success);
@@ -492,6 +506,9 @@ class MetricsService
// Stores the time of the last call to |GetIncrementalUptime()|.
base::TimeTicks last_updated_time_;
+ // Execution phase the browser is in.
+ static ExecutionPhase execution_phase_;
+
// Reduntant marker to check that we completed our shutdown, and set the
// exited-cleanly bit in the prefs.
static ShutdownCleanliness clean_shutdown_status_;
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698