#include "base/logging.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
+#include "components/user_manager/empty_user_info.h"
#include "ui/gfx/image/image_skia.h"
-namespace {
-// This isn't really used. It is mainly here to make the compiler happy.
-gfx::ImageSkia null_image;
-}
-
SessionStateDelegate::SessionStateDelegate() {
}
SessionStateDelegate::~SessionStateDelegate() {
}
+content::BrowserContext* SessionStateDelegate::GetBrowserContextByIndex(
+ ash::MultiProfileIndex index) {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+
+content::BrowserContext* SessionStateDelegate::GetBrowserContextForWindow(
+ aura::Window* window) {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+
int SessionStateDelegate::GetMaximumNumberOfLoggedInUsers() const {
return 3;
}
return false;
}
-const base::string16 SessionStateDelegate::GetUserDisplayName(
- ash::MultiProfileIndex index) const {
- NOTIMPLEMENTED();
- return base::UTF8ToUTF16("");
-}
-
-const std::string SessionStateDelegate::GetUserEmail(
- ash::MultiProfileIndex index) const {
- NOTIMPLEMENTED();
- return "";
+ash::SessionStateDelegate::SessionState SessionStateDelegate::GetSessionState()
+ const {
+ return SESSION_STATE_ACTIVE;
}
-const std::string SessionStateDelegate::GetUserID(
+const user_manager::UserInfo* SessionStateDelegate::GetUserInfo(
ash::MultiProfileIndex index) const {
- NOTIMPLEMENTED();
- return "";
+ return GetUserInfo(static_cast<content::BrowserContext*>(NULL));
}
-const gfx::ImageSkia& SessionStateDelegate::GetUserImage(
- ash::MultiProfileIndex index) const {
- NOTIMPLEMENTED();
- // To make the compiler happy.
- return null_image;
+const user_manager::UserInfo* SessionStateDelegate::GetUserInfo(
+ content::BrowserContext* context) const {
+ static const user_manager::UserInfo* kUserInfo =
+ new user_manager::EmptyUserInfo();
+ return kUserInfo;
}
-void SessionStateDelegate::GetLoggedInUsers(ash::UserIdList* users) {
- NOTIMPLEMENTED();
+bool SessionStateDelegate::ShouldShowAvatar(aura::Window* window) const {
+ return false;
}
void SessionStateDelegate::SwitchActiveUser(const std::string& user_id) {
NOTIMPLEMENTED();
}
+bool SessionStateDelegate::IsMultiProfileAllowedByPrimaryUserPolicy() const {
+ return true;
+}
+
void SessionStateDelegate::AddSessionStateObserver(
ash::SessionStateObserver* observer) {
NOTIMPLEMENTED();
ash::SessionStateObserver* observer) {
NOTIMPLEMENTED();
}
-
-bool SessionStateDelegate::TransferWindowToDesktopOfUser(
- aura::Window* window,
- ash::MultiProfileIndex index) {
- NOTIMPLEMENTED();
- return false;
-}