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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2913423003: Refactor recording of the Startup.FirstWebContents.RenderProcessHostInit.ToNonEmptyPaint metric
Patch Set: Created 3 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
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index d18fd32416a5d398395e58b9e776a8c26850380c..d0d9fd30713d135511b76b7e73927bdc08056b9d 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -54,6 +54,7 @@
#include "cc/base/switches.h"
#include "cc/output/buffer_to_texture_target_map.h"
#include "components/metrics/single_sample_metrics.h"
+#include "components/startup_metric_utils/browser/startup_metric_utils.h"
#include "components/tracing/common/tracing_switches.h"
#include "content/browser/appcache/appcache_dispatcher_host.h"
#include "content/browser/appcache/chrome_appcache_service.h"
@@ -1172,6 +1173,13 @@ bool RenderProcessHostImpl::Init() {
is_initialized_ = true;
init_time_ = base::TimeTicks::Now();
+
+ static bool is_first_call = true;
+ if (is_first_call) {
+ is_first_call = false;
+ startup_metric_utils::RecordFirstRenderProcessHostInit(init_time_);
+ }
+
return true;
}
« components/startup_metric_utils/browser/startup_metric_utils.cc ('K') | « content/browser/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698