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

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

Issue 2832903002: cros: Remove supervised user methods from SystemTrayDelegate (Closed)
Patch Set: rebase Created 3 years, 8 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/tray/system_tray.h ('k') | ash/system/tray/system_tray_delegate.h » ('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 f1909a0f4fcec8cfa65cdcd5c479625ed4794d13..b46a2da7d2beaec03b8304c8f0607188e08a407e 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -256,7 +256,8 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
AddTrayItem(base::MakeUnique<TraySessionLengthLimit>(this));
AddTrayItem(base::MakeUnique<TrayEnterprise>(this));
- AddTrayItem(base::MakeUnique<TraySupervisedUser>(this));
+ tray_supervised_user_ = new TraySupervisedUser(this);
+ AddTrayItem(base::WrapUnique(tray_supervised_user_));
AddTrayItem(base::MakeUnique<TrayIME>(this));
AddTrayItem(base::WrapUnique(tray_accessibility_));
AddTrayItem(base::MakeUnique<TrayTracing>(this));
@@ -304,7 +305,6 @@ void SystemTray::AddTrayItem(std::unique_ptr<SystemTrayItem> item) {
if (tray_item) {
tray_container()->AddChildViewAt(tray_item, 0);
PreferredSizeChanged();
- tray_item_map_[item_ptr] = tray_item;
}
}
@@ -612,12 +612,6 @@ void SystemTray::HideBubble(const TrayBubbleView* bubble_view) {
HideBubbleWithView(bubble_view);
}
-views::View* SystemTray::GetTrayItemViewForTest(SystemTrayItem* item) {
- std::map<SystemTrayItem*, views::View*>::iterator it =
- tray_item_map_.find(item);
- return it == tray_item_map_.end() ? NULL : it->second;
-}
-
TrayCast* SystemTray::GetTrayCastForTesting() const {
return tray_cast_;
}
@@ -626,6 +620,10 @@ TrayNetwork* SystemTray::GetTrayNetworkForTesting() const {
return tray_network_;
}
+TraySupervisedUser* SystemTray::GetTraySupervisedUserForTesting() const {
+ return tray_supervised_user_;
+}
+
TraySystemInfo* SystemTray::GetTraySystemInfoForTesting() const {
return tray_system_info_;
}
« no previous file with comments | « ash/system/tray/system_tray.h ('k') | ash/system/tray/system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698