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

Side by Side Diff: ash/common/system/chromeos/supervised/tray_supervised_user.cc

Issue 2162153002: Added Ash.SystemMenu.DefaultView.VisibleItems histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the COUNT value from the SystemMenuDefaultViewRows enum. Created 4 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/common/system/chromeos/supervised/tray_supervised_user.h" 5 #include "ash/common/system/chromeos/supervised/tray_supervised_user.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/login_status.h" 9 #include "ash/common/login_status.h"
10 #include "ash/common/system/system_notifier.h" 10 #include "ash/common/system/system_notifier.h"
(...skipping 10 matching lines...) Expand all
21 #include "ui/message_center/notification_delegate.h" 21 #include "ui/message_center/notification_delegate.h"
22 22
23 using message_center::Notification; 23 using message_center::Notification;
24 24
25 namespace ash { 25 namespace ash {
26 26
27 const char TraySupervisedUser::kNotificationId[] = 27 const char TraySupervisedUser::kNotificationId[] =
28 "chrome://user/locally-managed"; 28 "chrome://user/locally-managed";
29 29
30 TraySupervisedUser::TraySupervisedUser(SystemTray* system_tray) 30 TraySupervisedUser::TraySupervisedUser(SystemTray* system_tray)
31 : SystemTrayItem(system_tray), 31 : SystemTrayItem(system_tray, UMA_SUPERVISED_USER),
32 tray_view_(NULL), 32 tray_view_(NULL),
33 status_(LoginStatus::NOT_LOGGED_IN), 33 status_(LoginStatus::NOT_LOGGED_IN),
34 is_user_supervised_(false) { 34 is_user_supervised_(false) {
35 WmShell::Get()->system_tray_delegate()->AddCustodianInfoTrayObserver(this); 35 WmShell::Get()->system_tray_delegate()->AddCustodianInfoTrayObserver(this);
36 } 36 }
37 37
38 TraySupervisedUser::~TraySupervisedUser() { 38 TraySupervisedUser::~TraySupervisedUser() {
39 // We need the check as on shell destruction delegate is destroyed first. 39 // We need the check as on shell destruction delegate is destroyed first.
40 SystemTrayDelegate* system_tray_delegate = 40 SystemTrayDelegate* system_tray_delegate =
41 WmShell::Get()->system_tray_delegate(); 41 WmShell::Get()->system_tray_delegate();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 // Not intended to be used for non-supervised users. 125 // Not intended to be used for non-supervised users.
126 CHECK(delegate->IsUserSupervised()); 126 CHECK(delegate->IsUserSupervised());
127 127
128 if (delegate->IsUserChild()) 128 if (delegate->IsUserChild())
129 return IDR_AURA_UBER_TRAY_CHILD_USER; 129 return IDR_AURA_UBER_TRAY_CHILD_USER;
130 return IDR_AURA_UBER_TRAY_SUPERVISED_USER; 130 return IDR_AURA_UBER_TRAY_SUPERVISED_USER;
131 } 131 }
132 132
133 } // namespace ash 133 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/settings/tray_settings.cc ('k') | ash/common/system/chromeos/tray_caps_lock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698