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

Unified Diff: trunk/src/chrome/browser/ui/ash/session_state_delegate_views.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_views.cc
===================================================================
--- trunk/src/chrome/browser/ui/ash/session_state_delegate_views.cc (revision 267249)
+++ trunk/src/chrome/browser/ui/ash/session_state_delegate_views.cc (working copy)
@@ -4,51 +4,16 @@
#include "chrome/browser/ui/ash/session_state_delegate_views.h"
-#include "ash/session/user_info.h"
#include "base/logging.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.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;
+}
-class EmptyUserInfo : public ash::UserInfo {
- public:
- EmptyUserInfo() {}
- virtual ~EmptyUserInfo() {}
-
- // ash::UserInfo:
- virtual base::string16 GetDisplayName() const OVERRIDE {
- NOTIMPLEMENTED();
- return base::UTF8ToUTF16(std::string());
- }
- virtual base::string16 GetGivenName() const OVERRIDE {
- NOTIMPLEMENTED();
- return base::UTF8ToUTF16(std::string());
- }
- virtual std::string GetEmail() const OVERRIDE {
- NOTIMPLEMENTED();
- return std::string();
- }
- virtual std::string GetUserID() const OVERRIDE {
- NOTIMPLEMENTED();
- return std::string();
- }
-
- virtual const gfx::ImageSkia& GetImage() const OVERRIDE {
- NOTIMPLEMENTED();
- // To make the compiler happy.
- return null_image_;
- }
-
- private:
- const gfx::ImageSkia null_image_;
-
- DISALLOW_COPY_AND_ASSIGN(EmptyUserInfo);
-};
-
-} // namespace
-
SessionStateDelegate::SessionStateDelegate() {
}
@@ -106,18 +71,38 @@
return SESSION_STATE_ACTIVE;
}
-const ash::UserInfo* SessionStateDelegate::GetUserInfo(
+const base::string16 SessionStateDelegate::GetUserDisplayName(
ash::MultiProfileIndex index) const {
- return GetUserInfo(NULL);
+ NOTIMPLEMENTED();
+ return base::UTF8ToUTF16("");
}
-const ash::UserInfo* SessionStateDelegate::GetUserInfo(
+const base::string16 SessionStateDelegate::GetUserGivenName(
+ ash::MultiProfileIndex index) const {
+ NOTIMPLEMENTED();
+ return base::UTF8ToUTF16("");
+}
+
+const std::string SessionStateDelegate::GetUserEmail(
+ ash::MultiProfileIndex index) const {
+ NOTIMPLEMENTED();
+ return "";
+}
+
+const std::string SessionStateDelegate::GetUserID(
+ ash::MultiProfileIndex index) const {
+ NOTIMPLEMENTED();
+ return "";
+}
+
+const gfx::ImageSkia& SessionStateDelegate::GetUserImage(
content::BrowserContext* context) const {
- static const ash::UserInfo* kUserInfo = new EmptyUserInfo();
- return kUserInfo;
+ NOTIMPLEMENTED();
+ // To make the compiler happy.
+ return null_image;
}
-bool SessionStateDelegate::ShouldShowAvatar(aura::Window* window) const {
+bool SessionStateDelegate::ShouldShowAvatar(aura::Window* window) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698