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

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: Do not register action callback in single process. 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 d3ee4b8dce527ffa822c17609e5400d8b4f9489a..1c00fa1780bd3c7c7daf109e72d6d4c4e3ff83f4 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -735,6 +735,12 @@ void RenderThreadImpl::Init(
cc::SetClientNameForMetrics("Renderer");
+ if (!command_line.HasSwitch(switches::kSingleProcess)) {
+ action_callback_ = base::Bind(&RenderThreadImpl::RecordComputedAction,
+ base::Unretained(this));
+ base::AddActionCallback(action_callback_);
+ }
+
is_threaded_animation_enabled_ =
!command_line.HasSwitch(cc::switches::kDisableThreadedAnimation);
@@ -856,6 +862,9 @@ void RenderThreadImpl::Shutdown() {
FOR_EACH_OBSERVER(
RenderProcessObserver, observers_, OnRenderProcessShutdown());
+ if (!action_callback_.is_null())
+ base::RemoveActionCallback(action_callback_);
+
if (memory_observer_) {
message_loop()->RemoveTaskObserver(memory_observer_.get());
memory_observer_.reset();
« 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