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

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

Issue 2350423003: [Tentaive patch for discussion] Add Purge+Suspend metrics as UMA.
Patch Set: Fixed misuse of CanPurgeAndSuspend Created 4 years, 3 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 2d679e3236f31b2710423d7f5d4cf2d2d85d1a73..9e3999ab4cd6226841b702867f1d48f39dbe0ba5 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -993,6 +993,7 @@ bool RenderProcessHostImpl::Init() {
is_initialized_ = true;
init_time_ = base::TimeTicks::Now();
+ last_purge_and_suspend_time_ = base::TimeTicks::FromInternalValue(0);
return true;
}
@@ -1428,6 +1429,12 @@ bool RenderProcessHostImpl::IsWorkerRefCountDisabled() {
void RenderProcessHostImpl::PurgeAndSuspend() {
Send(new ChildProcessMsg_PurgeAndSuspend());
+ last_purge_and_suspend_time_ = base::TimeTicks::Now();
+}
+
+const base::TimeTicks& RenderProcessHostImpl::GetLastPurgeAndSuspendTime()
+ const {
+ return last_purge_and_suspend_time_;
}
mojom::RouteProvider* RenderProcessHostImpl::GetRemoteRouteProvider() {
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/child/child_discardable_shared_memory_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698