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

Unified Diff: ash/wm/maximize_mode/maximize_mode_controller.cc

Issue 914673003: Correctly record TouchView metrics on suspend/shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: also handle shutdown case Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/maximize_mode/maximize_mode_controller.cc
diff --git a/ash/wm/maximize_mode/maximize_mode_controller.cc b/ash/wm/maximize_mode/maximize_mode_controller.cc
index ee503a3a43609b482936e77511f7caf738eebb29..e12d95013c73245dcedee1cd2d979cf3260710bc 100644
--- a/ash/wm/maximize_mode/maximize_mode_controller.cc
+++ b/ash/wm/maximize_mode/maximize_mode_controller.cc
@@ -181,7 +181,10 @@ void MaximizeModeController::LidEventReceived(bool open,
}
void MaximizeModeController::SuspendImminent() {
- RecordTouchViewStateTransition();
+ // Only record TouchView state transition metrics if the suspend occurred
+ // while in TouchView mode.
+ if (IsMaximizeModeWindowManagerEnabled())
+ RecordTouchViewStateTransition();
flackr 2015/02/10 21:32:11 This looks like it will report touch view inactive
tdanderson 2015/02/12 19:51:00 Done.
}
void MaximizeModeController::SuspendDone(
@@ -290,7 +293,11 @@ void MaximizeModeController::RecordTouchViewStateTransition() {
void MaximizeModeController::OnAppTerminating() {
if (CanEnterMaximizeMode()) {
- RecordTouchViewStateTransition();
+ // Only record TouchView state transition metrics if shutdown occurred
+ // while in TouchView mode.
+ if (IsMaximizeModeWindowManagerEnabled())
+ RecordTouchViewStateTransition();
+
UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.TouchView.TouchViewActiveTotal",
total_touchview_time_.InMinutes(),
1, base::TimeDelta::FromDays(7).InMinutes(), 50);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698