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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1683583002: Report user actions when gesture starts and stops in user_model. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mini fix Created 4 years, 9 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') | tools/metrics/actions/actions.xml » ('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 aa8f002f944a4c82e3ece2712f8fe0f5db2bafba..701631fec4a37f282b7852271d9e0d62723109b0 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -640,6 +640,10 @@ void RenderThreadImpl::Init(
scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue) {
TRACE_EVENT0("startup", "RenderThreadImpl::Init");
+ action_callback_ = base::Bind(&RenderThreadImpl::RecordComputedAction,
+ base::Unretained(this));
+ base::AddActionCallback(action_callback_);
+
base::trace_event::TraceLog::GetInstance()->SetThreadSortIndex(
base::PlatformThread::CurrentId(),
kTraceEventRendererMainThreadSortIndex);
@@ -859,6 +863,7 @@ void RenderThreadImpl::Init(
}
RenderThreadImpl::~RenderThreadImpl() {
+ base::RemoveActionCallback(action_callback_);
piman 2016/03/23 19:48:08 Should this be in Shutdown for consistency?
beaudoin 2016/03/29 16:09:39 Done.
}
void RenderThreadImpl::Shutdown() {
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698