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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2773893003: Record size of scroller that user scrolls (Closed)
Patch Set: Redefine metrics using suffixes in histograms.xml Created 3 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: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index f5d61590fc92298ce666ef4bc98d379c68f9f6d4..8539907d5fb35a7361802aa5a488ca50c274c476 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2751,6 +2751,17 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollBegin(
scrolling_node =
scrolling_layer ? scroll_tree.Node(scrolling_layer->scroll_tree_index())
: nullptr;
+ if (!scroll_on_main_thread && scrolling_node) {
+ if (IsWheelBasedScroll(type)) {
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ "Event.Scroll.ScrollerSize.OnScroll_Wheel",
+ scrolling_node->scroll_clip_layer_bounds.GetArea(), 1, 90000, 50);
flackr 2017/03/28 14:40:23 Use a pair of constants for the 90000 and 50 and s
yigu 2017/03/29 15:32:03 Done.
+ } else {
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ "Event.Scroll.ScrollerSize.OnScroll_Touch",
+ scrolling_node->scroll_clip_layer_bounds.GetArea(), 1, 90000, 50);
+ }
+ }
}
if (scroll_on_main_thread) {

Powered by Google App Engine
This is Rietveld 408576698