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

Side by Side Diff: ash/metrics/user_metrics_recorder.cc

Issue 1132293004: Record time between switching the active window from Ash overview mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/metrics/user_metrics_recorder.h" 5 #include "ash/metrics/user_metrics_recorder.h"
6 6
7 #include "ash/session/session_state_delegate.h" 7 #include "ash/session/session_state_delegate.h"
8 #include "ash/shelf/shelf_delegate.h" 8 #include "ash/shelf/shelf_delegate.h"
9 #include "ash/shelf/shelf_item_types.h" 9 #include "ash/shelf/shelf_item_types.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 case ash::UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE_RIGHT: 577 case ash::UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE_RIGHT:
578 base::RecordAction(base::UserMetricsAction("MaxButton_MaxRight")); 578 base::RecordAction(base::UserMetricsAction("MaxButton_MaxRight"));
579 break; 579 break;
580 case ash::UMA_WINDOW_OVERVIEW: 580 case ash::UMA_WINDOW_OVERVIEW:
581 base::RecordAction( 581 base::RecordAction(
582 base::UserMetricsAction("WindowSelector_Overview")); 582 base::UserMetricsAction("WindowSelector_Overview"));
583 break; 583 break;
584 case ash::UMA_WINDOW_OVERVIEW_ACTIVE_WINDOW_CHANGED: 584 case ash::UMA_WINDOW_OVERVIEW_ACTIVE_WINDOW_CHANGED:
585 base::RecordAction( 585 base::RecordAction(
586 base::UserMetricsAction("WindowSelector_ActiveWindowChanged")); 586 base::UserMetricsAction("WindowSelector_ActiveWindowChanged"));
587 task_switch_metrics_recorder_.OnTaskSwitch(
588 TaskSwitchMetricsRecorder::kOverviewMode);
587 break; 589 break;
588 case ash::UMA_WINDOW_OVERVIEW_ENTER_KEY: 590 case ash::UMA_WINDOW_OVERVIEW_ENTER_KEY:
589 base::RecordAction( 591 base::RecordAction(
590 base::UserMetricsAction("WindowSelector_OverviewEnterKey")); 592 base::UserMetricsAction("WindowSelector_OverviewEnterKey"));
591 break; 593 break;
592 case ash::UMA_WINDOW_CYCLE: 594 case ash::UMA_WINDOW_CYCLE:
593 base::RecordAction( 595 base::RecordAction(
594 base::UserMetricsAction("WindowCycleController_Cycle")); 596 base::UserMetricsAction("WindowCycleController_Cycle"));
595 break; 597 break;
596 } 598 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 return IsUserActive() && !IsKioskModeActive(); 633 return IsUserActive() && !IsKioskModeActive();
632 } 634 }
633 635
634 void UserMetricsRecorder::StartTimer() { 636 void UserMetricsRecorder::StartTimer() {
635 timer_.Start(FROM_HERE, 637 timer_.Start(FROM_HERE,
636 base::TimeDelta::FromSeconds(kAshPeriodicMetricsTimeInSeconds), 638 base::TimeDelta::FromSeconds(kAshPeriodicMetricsTimeInSeconds),
637 this, &UserMetricsRecorder::RecordPeriodicMetrics); 639 this, &UserMetricsRecorder::RecordPeriodicMetrics);
638 } 640 }
639 641
640 } // namespace ash 642 } // namespace ash
OLDNEW
« no previous file with comments | « ash/metrics/task_switch_metrics_recorder_unittest.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698