OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/test/test_session_state_delegate.h" | 5 #include "ash/test/test_session_state_delegate.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 int TestSessionStateDelegate::GetMaximumNumberOfLoggedInUsers() const { | 109 int TestSessionStateDelegate::GetMaximumNumberOfLoggedInUsers() const { |
110 return 3; | 110 return 3; |
111 } | 111 } |
112 | 112 |
113 int TestSessionStateDelegate::NumberOfLoggedInUsers() const { | 113 int TestSessionStateDelegate::NumberOfLoggedInUsers() const { |
114 // TODO(skuhne): Add better test framework to test multiple profiles. | 114 // TODO(skuhne): Add better test framework to test multiple profiles. |
115 return has_active_user_ ? logged_in_users_ : 0; | 115 return has_active_user_ ? logged_in_users_ : 0; |
116 } | 116 } |
117 | 117 |
| 118 int TestSessionStateDelegate::GetNumberOfAdmittedForMultiProfileUsers() const { |
| 119 return user_list_.size() - NumberOfLoggedInUsers(); |
| 120 } |
| 121 |
118 bool TestSessionStateDelegate::IsActiveUserSessionStarted() const { | 122 bool TestSessionStateDelegate::IsActiveUserSessionStarted() const { |
119 return active_user_session_started_; | 123 return active_user_session_started_; |
120 } | 124 } |
121 | 125 |
122 bool TestSessionStateDelegate::CanLockScreen() const { | 126 bool TestSessionStateDelegate::CanLockScreen() const { |
123 return has_active_user_ && can_lock_screen_; | 127 return has_active_user_ && can_lock_screen_; |
124 } | 128 } |
125 | 129 |
126 bool TestSessionStateDelegate::IsScreenLocked() const { | 130 bool TestSessionStateDelegate::IsScreenLocked() const { |
127 return screen_locked_; | 131 return screen_locked_; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 void TestSessionStateDelegate::AddSessionStateObserver( | 239 void TestSessionStateDelegate::AddSessionStateObserver( |
236 SessionStateObserver* observer) { | 240 SessionStateObserver* observer) { |
237 } | 241 } |
238 | 242 |
239 void TestSessionStateDelegate::RemoveSessionStateObserver( | 243 void TestSessionStateDelegate::RemoveSessionStateObserver( |
240 SessionStateObserver* observer) { | 244 SessionStateObserver* observer) { |
241 } | 245 } |
242 | 246 |
243 } // namespace test | 247 } // namespace test |
244 } // namespace ash | 248 } // namespace ash |
OLD | NEW |