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

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 nit. 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 4d2f53eae305047d7b526df36e35aa92b33278c1..aa60711d22924743d0418daecc543c387398994b 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -634,6 +634,11 @@ RenderThreadImpl::RenderThreadImpl(
void RenderThreadImpl::Init() {
TRACE_EVENT0("startup", "RenderThreadImpl::Init");
+ base::RemoveActionCallback(action_callback_);
Ilya Sherman 2016/03/21 08:09:44 Hmm, why is this line needed?
beaudoin 2016/03/23 02:46:42 Copied the pattern from components/metrics/metrics
Ilya Sherman 2016/03/24 05:02:35 The example you gave is not an init function -- it
beaudoin 2016/03/24 21:08:55 It's gone now. :)
+ action_callback_ = base::Bind(&RenderThreadImpl::RecordComputedAction,
+ base::Unretained(this));
+ base::AddActionCallback(action_callback_);
+
base::trace_event::TraceLog::GetInstance()->SetThreadSortIndex(
base::PlatformThread::CurrentId(),
kTraceEventRendererMainThreadSortIndex);
@@ -853,6 +858,7 @@ void RenderThreadImpl::Init() {
}
RenderThreadImpl::~RenderThreadImpl() {
+ base::RemoveActionCallback(action_callback_);
}
void RenderThreadImpl::Shutdown() {

Powered by Google App Engine
This is Rietveld 408576698