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

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

Issue 2923083002: chromeos: Convert system tray session length limit to mojo (Closed)
Patch Set: Created 3 years, 6 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
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_;
}

Powered by Google App Engine
This is Rietveld 408576698