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

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

Issue 2651823002: Add .SingleTab and .MultiTabs suffix to Startup.FirstWebContents.MainNavigationStart histogram. (Closed)
Patch Set: rebase on r448292 Created 3 years, 10 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 90e827468bf2214fc46b76ade67e245af679da36..5ebb8ff5e77c397d7aeb649c001260765e611f68 100644
--- a/components/startup_metric_utils/browser/startup_metric_utils.h
+++ b/components/startup_metric_utils/browser/startup_metric_utils.h
@@ -18,6 +18,15 @@ class PrefService;
namespace startup_metric_utils {
+// Identifies the workload of profiled WebContents, used to refine startup
+// metrics.
+enum class WebContentsWorkload {
+ // Only loading a single tab.
+ SINGLE_TAB,
+ // Loading multiple tabs (of which the profiled WebContents is foreground).
+ MULTI_TABS,
+};
+
// Registers startup related prefs in |registry|.
void RegisterPrefs(PrefRegistrySimple* registry);
@@ -75,8 +84,9 @@ void RecordFirstWebContentsMainFrameLoad(const base::TimeTicks& ticks);
void RecordFirstWebContentsNonEmptyPaint(const base::TimeTicks& ticks);
// Call this with the time when the first web contents began navigating its main
-// frame.
-void RecordFirstWebContentsMainNavigationStart(const base::TimeTicks& ticks);
+// frame. Adds a suffix to its metrics according to |workload|.
+void RecordFirstWebContentsMainNavigationStart(const base::TimeTicks& ticks,
+ WebContentsWorkload workload);
// Call this with the time when the first web contents successfully committed
// its navigation for the main frame.
« no previous file with comments | « chrome/browser/metrics/first_web_contents_profiler.cc ('k') | components/startup_metric_utils/browser/startup_metric_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698