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

Unified Diff: ash/test/test_system_tray_delegate.cc

Issue 2829813002: cros: Move IsUserSupervised and IsUserChild off SystemTrayDelegate (Closed)
Patch Set: review comments 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/test/test_system_tray_delegate.h ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/test_system_tray_delegate.cc
diff --git a/ash/test/test_system_tray_delegate.cc b/ash/test/test_system_tray_delegate.cc
index dac714cc1a31c54cb143d70accfc7c190a014180..41fc0fd38456ec474ba9472a296440c83abaf522 100644
--- a/ash/test/test_system_tray_delegate.cc
+++ b/ash/test/test_system_tray_delegate.cc
@@ -14,14 +14,8 @@
namespace ash {
namespace test {
-namespace {
-
-LoginStatus g_initial_status = LoginStatus::USER;
-
-} // namespace
-
TestSystemTrayDelegate::TestSystemTrayDelegate()
- : login_status_(g_initial_status), session_length_limit_set_(false) {}
+ : login_status_(LoginStatus::USER), session_length_limit_set_(false) {}
TestSystemTrayDelegate::~TestSystemTrayDelegate() {}
@@ -49,12 +43,6 @@ void TestSystemTrayDelegate::SetAvailableIMEList(const IMEInfoList& list) {
}
LoginStatus TestSystemTrayDelegate::GetUserLoginStatus() const {
- // Initial login status has been changed for testing.
- if (g_initial_status != LoginStatus::USER &&
- g_initial_status == login_status_) {
- return login_status_;
- }
-
// At new user image screen manager->IsUserLoggedIn() would return true
// but there's no browser session available yet so use SessionStarted().
SessionController* controller = Shell::Get()->session_controller();
@@ -67,15 +55,11 @@ LoginStatus TestSystemTrayDelegate::GetUserLoginStatus() const {
}
std::string TestSystemTrayDelegate::GetSupervisedUserManager() const {
- if (!IsUserSupervised())
+ if (!Shell::Get()->session_controller()->IsUserSupervised())
return std::string();
return "manager@chrome.com";
}
-bool TestSystemTrayDelegate::IsUserSupervised() const {
- return login_status_ == LoginStatus::SUPERVISED;
-}
-
bool TestSystemTrayDelegate::GetSessionStartTime(
base::TimeTicks* session_start_time) {
// Just returns TimeTicks::Now(), so the remaining time is always the
@@ -100,16 +84,5 @@ void TestSystemTrayDelegate::GetAvailableIMEList(IMEInfoList* list) {
*list = ime_list_;
}
-////////////////////////////////////////////////////////////////////////////////
-
-ScopedInitialLoginStatus::ScopedInitialLoginStatus(LoginStatus new_status)
- : old_status_(g_initial_status) {
- g_initial_status = new_status;
-}
-
-ScopedInitialLoginStatus::~ScopedInitialLoginStatus() {
- g_initial_status = old_status_;
-}
-
} // namespace test
} // namespace ash
« no previous file with comments | « ash/test/test_system_tray_delegate.h ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698