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

Unified Diff: ash/system/tray/system_tray.cc

Issue 2864663002: cros: Merge SystemTrayDelegate::GetUserLoginStatus (Closed)
Patch Set: update PaletteTray to exclude ARC kiosk Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/status_area_widget.cc ('k') | ash/system/tray/system_tray_bubble.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray.cc
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index cc76d1068097efec0d4d5068776e8af061cd296a..f16a8991a802413843b031c6116361e119c5fef4 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -127,8 +127,8 @@ class SystemBubbleWrapper {
TrayBubbleView::InitParams* init_params,
bool is_persistent) {
DCHECK(anchor);
- LoginStatus login_status =
- Shell::Get()->system_tray_delegate()->GetUserLoginStatus();
+ const LoginStatus login_status =
+ Shell::Get()->session_controller()->login_status();
bubble_->InitView(anchor, login_status, init_params);
bubble_->bubble_view()->set_anchor_view_insets(anchor_insets);
bubble_wrapper_.reset(new TrayBubbleWrapper(tray, bubble_->bubble_view()));
@@ -293,9 +293,8 @@ void SystemTray::AddTrayItem(std::unique_ptr<SystemTrayItem> item) {
SystemTrayItem* item_ptr = item.get();
items_.push_back(std::move(item));
- SystemTrayDelegate* delegate = Shell::Get()->system_tray_delegate();
- views::View* tray_item =
- item_ptr->CreateTrayView(delegate->GetUserLoginStatus());
+ views::View* tray_item = item_ptr->CreateTrayView(
+ Shell::Get()->session_controller()->login_status());
item_ptr->UpdateAfterShelfAlignmentChange();
if (tray_item) {
@@ -433,13 +432,8 @@ void SystemTray::ShowItems(const std::vector<SystemTrayItem*>& items,
BubbleCreationType creation_type,
bool persistent) {
// No system tray bubbles in kiosk mode.
- SystemTrayDelegate* system_tray_delegate =
- Shell::Get()->system_tray_delegate();
- if (system_tray_delegate->GetUserLoginStatus() == LoginStatus::KIOSK_APP ||
- system_tray_delegate->GetUserLoginStatus() ==
- LoginStatus::ARC_KIOSK_APP) {
+ if (Shell::Get()->session_controller()->IsKioskSession())
return;
- }
// Destroy any existing bubble and create a new one.
SystemTrayBubble::BubbleType bubble_type =
« no previous file with comments | « ash/system/status_area_widget.cc ('k') | ash/system/tray/system_tray_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698