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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2643723007: time metric: record elapsed time from when the backgrounded and purged renderer is foregrounded unti (Closed)
Patch Set: Fixed. 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
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index fcd2444be29c2ade42b7a40228bc2712d0d65e86..642a33c88073036cd2bfab5e9251140c8d17214b 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -897,6 +897,7 @@ void RenderThreadImpl::Init(
record_purge_suspend_growth_metric_closure_.Reset(
base::Bind(&RenderThreadImpl::RecordPurgeAndSuspendMemoryGrowthMetrics,
base::Unretained(this)));
+ needs_to_record_first_active_paint_ = false;
base::MemoryCoordinatorClientRegistry::GetInstance()->Register(this);
@@ -1641,6 +1642,7 @@ void RenderThreadImpl::OnProcessBackgrounded(bool backgrounded) {
if (backgrounded) {
renderer_scheduler_->OnRendererBackgrounded();
+ needs_to_record_first_active_paint_ = false;
} else {
renderer_scheduler_->OnRendererForegrounded();
// TODO(tasak): after enabling MemoryCoordinator, remove this Notify
@@ -1680,6 +1682,7 @@ void RenderThreadImpl::OnProcessPurgeAndSuspend() {
GetRendererScheduler()->DefaultTaskRunner()->PostDelayedTask(
FROM_HERE, record_purge_suspend_metric_closure_.callback(),
base::TimeDelta::FromSeconds(15));
+ needs_to_record_first_active_paint_ = true;
}
// TODO(tasak): Replace the following GetMallocUsage() with memory-infra
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698