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

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: Fixed test 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
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 68fc3d2b467c005ad65a6a5eae8b6a4461589322..c27de87db4f07166668c04c1ec9994125ff0ed6f 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);
@@ -854,6 +859,7 @@ void RenderThreadImpl::Init() {
}
RenderThreadImpl::~RenderThreadImpl() {
+ base::RemoveActionCallback(action_callback_);
}
void RenderThreadImpl::Shutdown() {

Powered by Google App Engine
This is Rietveld 408576698