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

Unified Diff: ash/test/test_session_state_delegate.cc

Issue 14756019: Adding new user menu section to the SystemTrayMenu & refactoring of user access (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 7 years, 7 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/test/test_session_state_delegate.cc
diff --git a/ash/test/test_session_state_delegate.cc b/ash/test/test_session_state_delegate.cc
index 881f4982e04bd3f10c09f30ee125ca59f4c5c305..2cff17e0ef6ede8203db0fc7f9780f421e22d490 100644
--- a/ash/test/test_session_state_delegate.cc
+++ b/ash/test/test_session_state_delegate.cc
@@ -4,6 +4,9 @@
#include "ash/test/test_session_state_delegate.h"
+#include "base/string16.h"
+#include "base/utf_string_conversions.h"
+
namespace ash {
namespace test {
@@ -17,8 +20,13 @@ TestSessionStateDelegate::TestSessionStateDelegate()
TestSessionStateDelegate::~TestSessionStateDelegate() {
}
-bool TestSessionStateDelegate::HasActiveUser() const {
- return has_active_user_;
+int TestSessionStateDelegate::GetMaximumNumberOfLoggedInUsers() const {
+ return 3;
+}
+
+int TestSessionStateDelegate::NumberOfLoggedInUsers() const {
+ // TODO(skuhne): Add better test framework to test multiple profiles.
+ return has_active_user_ ? 1 : 0;
}
bool TestSessionStateDelegate::IsActiveUserSessionStarted() const {
@@ -59,5 +67,27 @@ void TestSessionStateDelegate::SetCanLockScreen(bool can_lock_screen) {
can_lock_screen_ = can_lock_screen;
}
+const base::string16 TestSessionStateDelegate::GetUserDisplayName(
+ ash::MultiProfileIndex index) const {
+ return UTF8ToUTF16("Über tray Über tray Über tray Über tray");
+}
+
+const std::string TestSessionStateDelegate::GetUserEmail(
+ ash::MultiProfileIndex index) const {
+ return "über@tray";
+}
+
+const gfx::ImageSkia& TestSessionStateDelegate::GetUserImage(
+ ash::MultiProfileIndex index) const {
+ return null_image_;
+}
+
+void TestSessionStateDelegate::GetLoggedInUsers(UserEmailList* users) {
+}
+
+void TestSessionStateDelegate::SwitchActiveUser(const std::string& email) {
+}
+
+
} // namespace test
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698