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

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

Issue 760763002: Add startup metrics that measure the performance of the first web contents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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: chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h
diff --git a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h
index 91b904d77375f5a13d43d063a1b58a60ae874ed0..618cb51a22af42f8ec67a6c5c7aefb08a68b984e 100644
--- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h
+++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h
@@ -29,6 +29,8 @@ class ChromeBrowserMainExtraPartsMetrics : public ChromeBrowserMainExtraParts,
void PostBrowserStart() override;
private:
+ class FirstWebContentsProfiler;
+
#if defined(OS_MACOSX) && !defined(OS_IOS)
// Records Mac specific metrics.
void RecordMacMetrics();
@@ -43,6 +45,9 @@ class ChromeBrowserMainExtraPartsMetrics : public ChromeBrowserMainExtraParts,
// If the number of displays has changed, emit a UMA metric.
void EmitDisplaysChangedMetric();
+ // Called by |first_web_contents_profiler_| when it wants to be destroyed.
+ void FirstWebContentsProfilerWantsDestruction();
Ilya Sherman 2014/11/26 02:24:55 This feels pretty hacky. I wonder if it would be
erikchen 2014/11/26 03:48:43 I don't like the style where objects own their own
+
// A cached value for the number of displays.
int display_count_;
@@ -50,6 +55,9 @@ class ChromeBrowserMainExtraPartsMetrics : public ChromeBrowserMainExtraParts,
// screen.
bool is_screen_observer_;
+ // Measures start up performance of the first active web contents.
+ scoped_ptr<FirstWebContentsProfiler> first_web_contents_profiler_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsMetrics);
};

Powered by Google App Engine
This is Rietveld 408576698