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

Unified Diff: components/startup_metric_utils/browser/startup_metric_utils.h

Issue 1637493002: Add SameVersionStartupCounts suffix to startup HardFault and Temperature histograms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b1_startup_count_metric
Patch Set: Created 4 years, 11 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
Index: components/startup_metric_utils/browser/startup_metric_utils.h
diff --git a/components/startup_metric_utils/browser/startup_metric_utils.h b/components/startup_metric_utils/browser/startup_metric_utils.h
index ba6c9cfff144d2821ab243df2956f570b2ef5268..2f80bbffacc3f55fb42449c0552a96a561194adc 100644
--- a/components/startup_metric_utils/browser/startup_metric_utils.h
+++ b/components/startup_metric_utils/browser/startup_metric_utils.h
@@ -34,8 +34,8 @@ enum StartupTemperature {
// The startup type couldn't quite be classified as warm or cold, but rather
// was somewhere in between.
LUKEWARM_STARTUP_TEMPERATURE = 2,
- // This must be after all meaningful values.
- STARTUP_TEMPERATURE_COUNT,
+ // This must be after all meaningful values and be equal to the last one.
+ STARTUP_TEMPERATURE_MAX = LUKEWARM_STARTUP_TEMPERATURE,
// Startup temperature wasn't yet determined.
UNDETERMINED_STARTUP_TEMPERATURE
};
@@ -76,21 +76,12 @@ void RecordMainEntryPointTime(const base::Time& time);
void RecordExeMainEntryPointTime(const base::Time& time);
// Call this with the time recorded just before the message loop is started.
-// |is_first_run| - is the current launch part of a first run.
+// |is_first_run| - is the current launch part of a first run. |pref_service|
+// will be used to store state for stats that span multiple startups and its
+// data should thus be consistent from one startup to the next.
void RecordBrowserMainMessageLoopStart(const base::TimeTicks& ticks,
- bool is_first_run);
-
-// Logs the Startup.TimeSinceLastStartup histogram. Obtains the timestamp of the
-// last startup from |pref_service| and overwrites it with the timestamp of the
-// current startup. If the startup temperature has been set by
-// RecordBrowserMainMessageLoopStart, the time since last startup is also logged
-// to an histogram suffixed with the startup temperature.
-void RecordTimeSinceLastStartup(PrefService* pref_service);
-
-// Logs the Startup.SameVersionStartupCount histogram. Relies on |pref_service|
-// to know information about the previous startups and store information for
-// future ones.
-void RecordStartupCount(PrefService* pref_service);
+ bool is_first_run,
+ PrefService* pref_service);
// Call this with the time when the first browser window became visible.
void RecordBrowserWindowDisplay(const base::TimeTicks& ticks);

Powered by Google App Engine
This is Rietveld 408576698