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

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: Rebase. Created 4 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
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index a62dd41541c5343e403e75a244ebf5bf2d22212d..7a0a4dadd38201004914b396a76a54ca007b0ad3 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -635,6 +635,11 @@ RenderThreadImpl::RenderThreadImpl(
void RenderThreadImpl::Init() {
TRACE_EVENT0("startup", "RenderThreadImpl::Init");
+ base::RemoveActionCallback(action_callback_);
+ action_callback_ = base::Bind(&RenderThreadImpl::RecordComputedAction,
+ base::Unretained(this));
+ base::AddActionCallback(action_callback_);
+
base::trace_event::TraceLog::GetInstance()->SetThreadSortIndex(
base::PlatformThread::CurrentId(),
kTraceEventRendererMainThreadSortIndex);
@@ -858,6 +863,7 @@ void RenderThreadImpl::Init() {
}
RenderThreadImpl::~RenderThreadImpl() {
+ base::RemoveActionCallback(action_callback_);
}
void RenderThreadImpl::Shutdown() {

Powered by Google App Engine
This is Rietveld 408576698