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

Issue 1153633006: Added UMA statistics for changing the active window via click or touch events. (Closed)

Created:
5 years, 7 months ago by bruthig
Modified:
5 years, 6 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, tdanderson+views_chromium.org, sadrul, tfarina, chromium-apps-reviews_chromium.org, kalyank
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added UMA statistics for changing the active window via click or touch events. TEST=TaskSwitchMetricsRecorderTest.VerifyTaskSwitchesForDesktopAreRecorded TEST=DesktopTaskSwitchMetricRecorderTest.ActivatePositionableWindowWhenNullWindowWasActivatedLast TEST=DesktopTaskSwitchMetricRecorderTest.ActivatePositionableWindowWhenADifferentPositionableWindowWasActivatedLast TEST=DesktopTaskSwitchMetricRecorderTest.ActivatePositionableWindowWhenTheSamePositionableWindowWasActivatedLast TEST=DesktopTaskSwitchMetricRecorderTest.ActivatePositionableWindowWhenANonPositionableWindowWasActivatedLast TEST=DesktopTaskSwitchMetricRecorderTest.ActivateNonPositionableWindowBetweenTwoPositionableWindowActivations TEST=DesktopTaskSwitchMetricRecorderTest.ActivateNullWindow TEST=DesktopTaskSwitchMetricRecorderTest.ActivateNonPositionableWindow TEST=DesktopTaskSwitchMetricRecorderTest.ActivatePositionableWindowWithNonInputEventReason TEST=DesktopTaskSwitchMetricRecorderWithShellIntegrationTest.ActivatePositionableWindowWithInputEvent TEST=DesktopTaskSwitchMetricRecorderWithShellIntegrationTest.ActivatePositionableWindowWithNonInputEvent BUG=489813, 489814 Committed: https://crrev.com/9a312138c831f3203ddfa6dff5650bf663acb44f Cr-Commit-Position: refs/heads/master@{#333104}

Patch Set 1 #

Total comments: 16

Patch Set 2 : Reworked approach to use the an ActivationChangeObserver. #

Total comments: 2

Patch Set 3 : Polish and added unit tests. #

Total comments: 1

Patch Set 4 : Removed if(layer()) checks from window.cc #

Patch Set 5 : Split out ActivationReason work into a separate CL. #

Patch Set 6 : Added the missed desktop_task_switch_metric_recorder files. #

Total comments: 13

Patch Set 7 : Addressed comments from patch set 6. #

Total comments: 1

Patch Set 8 : Fixed minor formatting nit. #

Patch Set 9 : Fixed the branch that the CL was based on. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+506 lines, -0 lines) Patch
M ash/ash.gyp View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
A ash/metrics/desktop_task_switch_metric_recorder.h View 1 2 3 4 5 6 1 chunk +39 lines, -0 lines 0 comments Download
A ash/metrics/desktop_task_switch_metric_recorder.cc View 1 2 5 1 chunk +38 lines, -0 lines 0 comments Download
A ash/metrics/desktop_task_switch_metric_recorder_unittest.cc View 1 2 3 4 5 6 7 1 chunk +338 lines, -0 lines 1 comment Download
M ash/metrics/task_switch_metrics_recorder.h View 1 2 3 4 5 6 2 chunks +8 lines, -0 lines 0 comments Download
M ash/metrics/task_switch_metrics_recorder.cc View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M ash/metrics/task_switch_metrics_recorder_unittest.cc View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M ash/metrics/user_metrics_recorder.h View 1 2 3 4 5 6 4 chunks +15 lines, -0 lines 0 comments Download
M ash/metrics/user_metrics_recorder.cc View 1 2 3 4 5 6 3 chunks +19 lines, -0 lines 0 comments Download
M ash/shell.cc View 1 2 3 4 8 2 chunks +4 lines, -0 lines 0 comments Download
M tools/metrics/actions/actions.xml View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (6 generated)
bruthig
tdanderson@, can you please take a look from a design/feature correctness perspective before I harden ...
5 years, 7 months ago (2015-05-25 17:46:03 UTC) #2
tdanderson
Ben, please see my feedback below: https://codereview.chromium.org/1153633006/diff/1/ash/metrics/screen_event_task_switch_metric_recorder.h File ash/metrics/screen_event_task_switch_metric_recorder.h (right): https://codereview.chromium.org/1153633006/diff/1/ash/metrics/screen_event_task_switch_metric_recorder.h#newcode35 ash/metrics/screen_event_task_switch_metric_recorder.h:35: aura::Window* active_window_before_activation_ = ...
5 years, 7 months ago (2015-05-26 21:13:53 UTC) #3
bruthig
sky@, would you be able to take an early look from a design perspective before ...
5 years, 7 months ago (2015-05-26 21:39:51 UTC) #5
sky
On 2015/05/26 21:39:51, bruthig wrote: > sky@, would you be able to take an early ...
5 years, 7 months ago (2015-05-27 15:30:27 UTC) #6
sky
https://codereview.chromium.org/1153633006/diff/1/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc (right): https://codereview.chromium.org/1153633006/diff/1/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc#newcode484 ui/views/widget/desktop_aura/desktop_native_widget_aura.cc:484: window_activation_pretarget_handler_.reset( I don't like separating out activation from the ...
5 years, 7 months ago (2015-05-27 15:37:52 UTC) #7
bruthig
I've reworked the CL to use the alternative approach. sky@, can you please have a ...
5 years, 6 months ago (2015-06-01 21:21:36 UTC) #8
sky
This is the approach I recommended previously, right? Seems fine to me. https://codereview.chromium.org/1153633006/diff/20001/ui/wm/public/activation_change_observer.h File ui/wm/public/activation_change_observer.h ...
5 years, 6 months ago (2015-06-02 15:43:03 UTC) #9
bruthig
*** NOTE: This CL is based off of https://codereview.chromium.org/1157843009/. tdanderson@, can you please have a ...
5 years, 6 months ago (2015-06-03 21:59:32 UTC) #11
danakj
https://codereview.chromium.org/1153633006/diff/40001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/1153633006/diff/40001/ui/aura/window.cc#newcode205 ui/aura/window.cc:205: if (layer()) { Not having a layer means you ...
5 years, 6 months ago (2015-06-03 22:02:50 UTC) #12
bruthig
Reverted changes to window.cc as per danakj@'s comments.
5 years, 6 months ago (2015-06-03 22:13:54 UTC) #13
sky
Oy, large patches are painful all around. How about separating this into some smaller patches? ...
5 years, 6 months ago (2015-06-03 23:31:14 UTC) #14
bruthig
*** NOTE: This CL is based off of https://codereview.chromium.org/1151133003/. I've split out the changes to ...
5 years, 6 months ago (2015-06-04 17:47:32 UTC) #15
Alexei Svitkine (slow)
https://codereview.chromium.org/1153633006/diff/100001/tools/metrics/actions/actions.xml File tools/metrics/actions/actions.xml (right): https://codereview.chromium.org/1153633006/diff/100001/tools/metrics/actions/actions.xml#newcode2509 tools/metrics/actions/actions.xml:2509: it in the 2-dimensional screen space. I find this ...
5 years, 6 months ago (2015-06-04 18:16:04 UTC) #16
sky
LGTM https://codereview.chromium.org/1153633006/diff/100001/ash/metrics/task_switch_metrics_recorder.h File ash/metrics/task_switch_metrics_recorder.h (right): https://codereview.chromium.org/1153633006/diff/100001/ash/metrics/task_switch_metrics_recorder.h#newcode33 ash/metrics/task_switch_metrics_recorder.h:33: kDesktop, For the record this style is wrong ...
5 years, 6 months ago (2015-06-04 20:10:52 UTC) #17
tdanderson
lgtm with a few comments below https://chromiumcodereview.appspot.com/1153633006/diff/100001/ash/metrics/user_metrics_recorder.h File ash/metrics/user_metrics_recorder.h (right): https://chromiumcodereview.appspot.com/1153633006/diff/100001/ash/metrics/user_metrics_recorder.h#newcode192 ash/metrics/user_metrics_recorder.h:192: // The metric ...
5 years, 6 months ago (2015-06-04 22:15:52 UTC) #18
bruthig
I've addressed the comments from patch set 6. tdanderson@, can you please have another look ...
5 years, 6 months ago (2015-06-05 17:28:21 UTC) #19
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/1153633006/diff/120001/ash/metrics/desktop_task_switch_metric_recorder_unittest.cc File ash/metrics/desktop_task_switch_metric_recorder_unittest.cc (right): https://codereview.chromium.org/1153633006/diff/120001/ash/metrics/desktop_task_switch_metric_recorder_unittest.cc#newcode77 ash/metrics/desktop_task_switch_metric_recorder_unittest.cc:77: metrics_recorder_.reset(new DesktopTaskSwitchMetricRecorder()); Nit: Remove ()'s since you don't ...
5 years, 6 months ago (2015-06-05 17:39:24 UTC) #20
tdanderson
Patch Set 7 lgtm
5 years, 6 months ago (2015-06-05 17:50:19 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1153633006/160001
5 years, 6 months ago (2015-06-05 17:53:39 UTC) #24
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 6 months ago (2015-06-05 18:57:12 UTC) #25
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/9a312138c831f3203ddfa6dff5650bf663acb44f Cr-Commit-Position: refs/heads/master@{#333104}
5 years, 6 months ago (2015-06-05 19:06:27 UTC) #26
Jeffrey Yasskin
https://codereview.chromium.org/1153633006/diff/160001/ash/metrics/desktop_task_switch_metric_recorder_unittest.cc File ash/metrics/desktop_task_switch_metric_recorder_unittest.cc (right): https://codereview.chromium.org/1153633006/diff/160001/ash/metrics/desktop_task_switch_metric_recorder_unittest.cc#newcode104 ash/metrics/desktop_task_switch_metric_recorder_unittest.cc:104: new aura::Window(new aura::test::TestWindowDelegate)); aura::Window doesn't appear to take ownership ...
5 years, 6 months ago (2015-06-05 22:53:51 UTC) #28
Jeffrey Yasskin
5 years, 6 months ago (2015-06-05 23:17:50 UTC) #29
Message was sent while issue was closed.
On 2015/06/05 22:53:51, Jeffrey Yasskin wrote:
>
https://codereview.chromium.org/1153633006/diff/160001/ash/metrics/desktop_ta...
> File ash/metrics/desktop_task_switch_metric_recorder_unittest.cc (right):
> 
>
https://codereview.chromium.org/1153633006/diff/160001/ash/metrics/desktop_ta...
> ash/metrics/desktop_task_switch_metric_recorder_unittest.cc:104: new
> aura::Window(new aura::test::TestWindowDelegate));
> aura::Window doesn't appear to take ownership of its delegate, so this is
> leaking the TestWindowDelegate:
>
http://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20OS%20%28v....

Reverting in https://codereview.chromium.org/1165003010.

Powered by Google App Engine
This is Rietveld 408576698