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

Unified Diff: ash/metrics/user_metrics_recorder.cc

Issue 2421323002: Created new account type for ARC++ kiosk. (Closed)
Patch Set: Rebase Created 4 years, 2 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 | « ash/common/system/user/tray_user.cc ('k') | ash/system/chromeos/screen_layout_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/metrics/user_metrics_recorder.cc
diff --git a/ash/metrics/user_metrics_recorder.cc b/ash/metrics/user_metrics_recorder.cc
index cec99ef3986be5242f40e40ac0eae7212d518389..5222e61ccd42e34c078935e4814f697650ae8aad 100644
--- a/ash/metrics/user_metrics_recorder.cc
+++ b/ash/metrics/user_metrics_recorder.cc
@@ -92,6 +92,12 @@ bool IsKioskModeActive() {
LoginStatus::KIOSK_APP;
}
+// Returns true if ARC kiosk mode is active.
+bool IsArcKioskModeActive() {
+ return WmShell::Get()->system_tray_delegate()->GetUserLoginStatus() ==
+ LoginStatus::ARC_KIOSK_APP;
+}
+
// Returns true if there is an active user and their session isn't currently
// locked.
bool IsUserActive() {
@@ -105,6 +111,7 @@ bool IsUserActive() {
case LoginStatus::PUBLIC:
case LoginStatus::SUPERVISED:
case LoginStatus::KIOSK_APP:
+ case LoginStatus::ARC_KIOSK_APP:
return true;
}
NOTREACHED();
@@ -649,7 +656,7 @@ void UserMetricsRecorder::RecordPeriodicMetrics() {
}
bool UserMetricsRecorder::IsUserInActiveDesktopEnvironment() const {
- return IsUserActive() && !IsKioskModeActive();
+ return IsUserActive() && !IsKioskModeActive() && !IsArcKioskModeActive();
}
void UserMetricsRecorder::StartTimer() {
« no previous file with comments | « ash/common/system/user/tray_user.cc ('k') | ash/system/chromeos/screen_layout_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698