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

Unified Diff: trunk/src/chrome/browser/ui/ash/session_state_delegate_chromeos.cc

Issue 260783002: Revert 267158 "CleanUp: Introduce UserInfo. Move session_state s..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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
Index: trunk/src/chrome/browser/ui/ash/session_state_delegate_chromeos.cc
===================================================================
--- trunk/src/chrome/browser/ui/ash/session_state_delegate_chromeos.cc (revision 267249)
+++ trunk/src/chrome/browser/ui/ash/session_state_delegate_chromeos.cc (working copy)
@@ -5,7 +5,7 @@
#include "chrome/browser/ui/ash/session_state_delegate_chromeos.h"
#include "ash/multi_profile_uma.h"
-#include "ash/session/session_state_observer.h"
+#include "ash/session_state_observer.h"
#include "base/command_line.h"
#include "base/logging.h"
#include "base/prefs/pref_service.h"
@@ -132,21 +132,44 @@
return session_state_;
}
-const ash::UserInfo* SessionStateDelegateChromeos::GetUserInfo(
+const base::string16 SessionStateDelegateChromeos::GetUserDisplayName(
ash::MultiProfileIndex index) const {
DCHECK_LT(index, NumberOfLoggedInUsers());
- return chromeos::UserManager::Get()->GetLRULoggedInUsers()[index];
+ return chromeos::UserManager::Get()->
+ GetLRULoggedInUsers()[index]->display_name();
}
-const ash::UserInfo* SessionStateDelegateChromeos::GetUserInfo(
+const base::string16 SessionStateDelegateChromeos::GetUserGivenName(
+ ash::MultiProfileIndex index) const {
+ DCHECK_LT(index, NumberOfLoggedInUsers());
+ return chromeos::UserManager::Get()
+ ->GetLRULoggedInUsers()[index]
+ ->given_name();
+}
+
+const std::string SessionStateDelegateChromeos::GetUserEmail(
+ ash::MultiProfileIndex index) const {
+ DCHECK_LT(index, NumberOfLoggedInUsers());
+ return chromeos::UserManager::Get()->
+ GetLRULoggedInUsers()[index]->display_email();
+}
+
+const std::string SessionStateDelegateChromeos::GetUserID(
+ ash::MultiProfileIndex index) const {
+ DCHECK_LT(index, NumberOfLoggedInUsers());
+ return gaia::CanonicalizeEmail(gaia::SanitizeEmail(
+ chromeos::UserManager::Get()->
+ GetLRULoggedInUsers()[index]->email()));
+}
+
+const gfx::ImageSkia& SessionStateDelegateChromeos::GetUserImage(
content::BrowserContext* context) const {
DCHECK(context);
return chromeos::UserManager::Get()->GetUserByProfile(
- Profile::FromBrowserContext(context));
+ Profile::FromBrowserContext(context))->image();
}
-bool SessionStateDelegateChromeos::ShouldShowAvatar(
- aura::Window* window) const {
+bool SessionStateDelegateChromeos::ShouldShowAvatar(aura::Window* window) {
return chrome::MultiUserWindowManager::GetInstance()->
ShouldShowAvatar(window);
}

Powered by Google App Engine
This is Rietveld 408576698