Chromium Code Reviews| Index: ash/system/tray/system_tray.cc |
| diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc |
| index 121f24539ac1f98607b70ae99f87f5819fe4429b..d5d81b978eb137ece5bb84fcd7961461347f3b3f 100644 |
| --- a/ash/system/tray/system_tray.cc |
| +++ b/ash/system/tray/system_tray.cc |
| @@ -237,7 +237,8 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) { |
| // Otherwise it could be a main axis margin on the tray's box layout. |
| AddTrayItem(base::MakeUnique<PaddingTrayItem>()); |
| - AddTrayItem(base::MakeUnique<TraySessionLengthLimit>(this)); |
| + tray_session_length_limit_ = new TraySessionLengthLimit(this); |
| + AddTrayItem(base::WrapUnique(tray_session_length_limit_)); |
| tray_enterprise_ = new TrayEnterprise(this); |
| AddTrayItem(base::WrapUnique(tray_enterprise_)); |
| tray_supervised_user_ = new TraySupervisedUser(this); |
| @@ -600,6 +601,11 @@ TrayNetwork* SystemTray::GetTrayNetworkForTesting() const { |
| return tray_network_; |
| } |
| +TraySessionLengthLimit* SystemTray::GetTraySessionLengthLimitForTesting() |
|
msw
2017/06/06 19:01:04
aside: these could all be simple accessors inlined
James Cook
2017/06/07 00:48:13
Acknowledged. I plan to introduce a testapi class,
|
| + const { |
| + return tray_session_length_limit_; |
| +} |
| + |
| TraySupervisedUser* SystemTray::GetTraySupervisedUserForTesting() const { |
| return tray_supervised_user_; |
| } |