summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/chromeos/accessibility/accessibility_manager.cc2
-rw-r--r--chrome/browser/chromeos/accessibility/accessibility_manager.h2
-rw-r--r--chrome/browser/chromeos/accessibility/magnification_manager.cc2
-rw-r--r--chrome/browser/chromeos/dbus/printer_service_provider.cc2
-rw-r--r--chrome/browser/chromeos/extensions/first_run_private_api.cc4
-rw-r--r--chrome/browser/chromeos/file_manager/file_manager_browsertest.cc2
-rw-r--r--chrome/browser/chromeos/login/session_login_browsertest.cc2
-rw-r--r--chrome/browser/chromeos/login/user.cc18
-rw-r--r--chrome/browser/chromeos/login/user.h21
-rw-r--r--chrome/browser/chromeos/login/user_adding_screen_browsertest.cc2
-rw-r--r--chrome/browser/chromeos/login/user_image_manager_browsertest.cc32
-rw-r--r--chrome/browser/chromeos/login/user_image_manager_impl.cc2
-rw-r--r--chrome/browser/chromeos/memory/oom_priority_manager.cc2
-rw-r--r--chrome/browser/chromeos/policy/device_local_account_browsertest.cc2
-rw-r--r--chrome/browser/chromeos/profiles/profile_list_chromeos.cc2
-rw-r--r--chrome/browser/idle_chromeos.cc2
-rw-r--r--chrome/browser/notifications/message_center_settings_controller.cc12
-rw-r--r--chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc23
-rw-r--r--chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc8
-rw-r--r--chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc10
-rw-r--r--chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc2
-rw-r--r--chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h2
-rw-r--r--chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc19
-rw-r--r--chrome/browser/ui/ash/session_state_delegate_chromeos.cc37
-rw-r--r--chrome/browser/ui/ash/session_state_delegate_chromeos.h14
-rw-r--r--chrome/browser/ui/ash/session_state_delegate_views.cc73
-rw-r--r--chrome/browser/ui/ash/session_state_delegate_views.h14
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_chromeos.cc4
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_chromeos.h2
-rw-r--r--chrome/browser/ui/browser_command_controller.cc2
-rw-r--r--chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc2
-rw-r--r--chrome/browser/ui/views/frame/browser_frame.cc2
-rw-r--r--chrome/browser/ui/views/frame/system_menu_model_builder.cc15
-rw-r--r--chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc4
-rw-r--r--chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc2
35 files changed, 166 insertions, 180 deletions
diff --git a/chrome/browser/chromeos/accessibility/accessibility_manager.cc b/chrome/browser/chromeos/accessibility/accessibility_manager.cc
index 58a9d6f..b0152ab 100644
--- a/chrome/browser/chromeos/accessibility/accessibility_manager.cc
+++ b/chrome/browser/chromeos/accessibility/accessibility_manager.cc
@@ -8,7 +8,7 @@
#include "ash/autoclick/autoclick_controller.h"
#include "ash/high_contrast/high_contrast_controller.h"
#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/sticky_keys/sticky_keys_controller.h"
#include "ash/system/tray/system_tray_notifier.h"
diff --git a/chrome/browser/chromeos/accessibility/accessibility_manager.h b/chrome/browser/chromeos/accessibility/accessibility_manager.h
index a0aec2c..21584ee 100644
--- a/chrome/browser/chromeos/accessibility/accessibility_manager.h
+++ b/chrome/browser/chromeos/accessibility/accessibility_manager.h
@@ -8,7 +8,7 @@
#include <set>
#include "ash/accessibility_delegate.h"
-#include "ash/session/session_state_observer.h"
+#include "ash/session_state_observer.h"
#include "base/callback_list.h"
#include "base/memory/weak_ptr.h"
#include "base/prefs/pref_change_registrar.h"
diff --git a/chrome/browser/chromeos/accessibility/magnification_manager.cc b/chrome/browser/chromeos/accessibility/magnification_manager.cc
index 6d2b358..60ff17b 100644
--- a/chrome/browser/chromeos/accessibility/magnification_manager.cc
+++ b/chrome/browser/chromeos/accessibility/magnification_manager.cc
@@ -8,7 +8,7 @@
#include "ash/magnifier/magnification_controller.h"
#include "ash/magnifier/partial_magnification_controller.h"
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/shell_delegate.h"
#include "ash/system/tray/system_tray_notifier.h"
diff --git a/chrome/browser/chromeos/dbus/printer_service_provider.cc b/chrome/browser/chromeos/dbus/printer_service_provider.cc
index 7813159..0f01405 100644
--- a/chrome/browser/chromeos/dbus/printer_service_provider.cc
+++ b/chrome/browser/chromeos/dbus/printer_service_provider.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/chromeos/dbus/printer_service_provider.h"
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/wm/window_util.h"
#include "base/bind.h"
diff --git a/chrome/browser/chromeos/extensions/first_run_private_api.cc b/chrome/browser/chromeos/extensions/first_run_private_api.cc
index 2828af6..9f56c96 100644
--- a/chrome/browser/chromeos/extensions/first_run_private_api.cc
+++ b/chrome/browser/chromeos/extensions/first_run_private_api.cc
@@ -19,11 +19,11 @@ bool FirstRunPrivateGetLocalizedStringsFunction::RunSync() {
base::DictionaryValue* localized_strings = new base::DictionaryValue();
chromeos::User* user =
chromeos::UserManager::Get()->GetUserByProfile(GetProfile());
- if (!user->GetGivenName().empty()) {
+ if (!user->given_name().empty()) {
localized_strings->SetString(
"greetingHeader",
l10n_util::GetStringFUTF16(IDS_FIRST_RUN_GREETING_STEP_HEADER,
- user->GetGivenName()));
+ user->given_name()));
} else {
localized_strings->SetString(
"greetingHeader",
diff --git a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
index 04e60ce..a626517c4 100644
--- a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
+++ b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
@@ -13,7 +13,7 @@
#include "apps/app_window.h"
#include "apps/app_window_registry.h"
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "base/bind.h"
#include "base/callback.h"
diff --git a/chrome/browser/chromeos/login/session_login_browsertest.cc b/chrome/browser/chromeos/login/session_login_browsertest.cc
index 941485a..75e5b4928 100644
--- a/chrome/browser/chromeos/login/session_login_browsertest.cc
+++ b/chrome/browser/chromeos/login/session_login_browsertest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "chrome/browser/chromeos/login/login_manager_test.h"
#include "chrome/browser/chromeos/login/startup_utils.h"
diff --git a/chrome/browser/chromeos/login/user.cc b/chrome/browser/chromeos/login/user.cc
index b1b35e3..f165e55 100644
--- a/chrome/browser/chromeos/login/user.cc
+++ b/chrome/browser/chromeos/login/user.cc
@@ -10,7 +10,6 @@
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/chromeos/login/default_user_images.h"
#include "chrome/browser/chromeos/login/user_manager.h"
-#include "google_apis/gaia/gaia_auth_util.h"
#include "grit/theme_resources.h"
#include "ui/base/resource/resource_bundle.h"
@@ -169,10 +168,6 @@ void UserContext::CopyFrom(const UserContext& other) {
auth_flow = other.auth_flow;
}
-std::string User::GetEmail() const {
- return display_email();
-}
-
base::string16 User::GetDisplayName() const {
// Fallback to the email account name in case display name haven't been set.
return display_name_.empty() ?
@@ -180,19 +175,6 @@ base::string16 User::GetDisplayName() const {
display_name_;
}
-base::string16 User::GetGivenName() const {
- return given_name_;
-}
-
-const gfx::ImageSkia& User::GetImage() const {
- return user_image_.image();
-}
-
-std::string User::GetUserID() const {
- return gaia::CanonicalizeEmail(gaia::SanitizeEmail(
- email()));
-}
-
std::string User::GetAccountName(bool use_display_email) const {
if (use_display_email && !display_email_.empty())
return GetUserName(display_email_);
diff --git a/chrome/browser/chromeos/login/user.h b/chrome/browser/chromeos/login/user.h
index 58eb1a3..e80b13b 100644
--- a/chrome/browser/chromeos/login/user.h
+++ b/chrome/browser/chromeos/login/user.h
@@ -8,7 +8,6 @@
#include <string>
#include <vector>
-#include "ash/session/user_info.h"
#include "base/basictypes.h"
#include "base/strings/string16.h"
#include "chrome/browser/chromeos/login/user_image.h"
@@ -70,7 +69,7 @@ struct UserContext {
// returned by |displayed_email()|.
// Displayed emails are for use in UI only, anywhere else users must be referred
// to by |email()|.
-class User : public ash::UserInfo {
+class User {
public:
// The user type. Used in a histogram; do not modify existing types.
typedef enum {
@@ -124,20 +123,19 @@ class User : public ash::UserInfo {
// The email the user used to log in.
const std::string& email() const { return email_; }
- // The displayed user name.
- base::string16 display_name() const { return display_name_; }
+ // Returns the human name to display for this user.
+ base::string16 GetDisplayName() const;
- // ash::UserInfo
- virtual std::string GetEmail() const OVERRIDE;
- virtual base::string16 GetDisplayName() const OVERRIDE;
- virtual base::string16 GetGivenName() const OVERRIDE;
- virtual const gfx::ImageSkia& GetImage() const OVERRIDE;
- virtual std::string GetUserID() const OVERRIDE;
+ // Returns given name of user, or empty string if given name is unknown.
+ const base::string16& given_name() const { return given_name_; }
// Returns the account name part of the email. Use the display form of the
// email if available and use_display_name == true. Otherwise use canonical.
std::string GetAccountName(bool use_display_email) const;
+ // The image for this user.
+ const gfx::ImageSkia& image() const { return user_image_.image(); }
+
// Whether the user has a default image.
bool HasDefaultImage() const;
@@ -170,6 +168,9 @@ class User : public ash::UserInfo {
// True if image is being loaded from file.
bool image_is_loading() const { return image_is_loading_; }
+ // The displayed user name.
+ base::string16 display_name() const { return display_name_; }
+
// The displayed (non-canonical) user email.
virtual std::string display_email() const;
diff --git a/chrome/browser/chromeos/login/user_adding_screen_browsertest.cc b/chrome/browser/chromeos/login/user_adding_screen_browsertest.cc
index 5c90708..fb02077 100644
--- a/chrome/browser/chromeos/login/user_adding_screen_browsertest.cc
+++ b/chrome/browser/chromeos/login/user_adding_screen_browsertest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/chromeos/login/login_display_host_impl.h"
diff --git a/chrome/browser/chromeos/login/user_image_manager_browsertest.cc b/chrome/browser/chromeos/login/user_image_manager_browsertest.cc
index 796998b..03d3064 100644
--- a/chrome/browser/chromeos/login/user_image_manager_browsertest.cc
+++ b/chrome/browser/chromeos/login/user_image_manager_browsertest.cc
@@ -362,8 +362,8 @@ IN_PROC_BROWSER_TEST_F(UserImageManagerTest, PRE_NonJPEGImageFromFile) {
EXPECT_FALSE(user->image_is_safe_format());
// Check image dimensions.
const gfx::ImageSkia& saved_image = GetDefaultImage(kFirstDefaultImageIndex);
- EXPECT_EQ(saved_image.width(), user->GetImage().width());
- EXPECT_EQ(saved_image.height(), user->GetImage().height());
+ EXPECT_EQ(saved_image.width(), user->image().width());
+ EXPECT_EQ(saved_image.height(), user->image().height());
}
IN_PROC_BROWSER_TEST_F(UserImageManagerTest, NonJPEGImageFromFile) {
@@ -380,8 +380,8 @@ IN_PROC_BROWSER_TEST_F(UserImageManagerTest, NonJPEGImageFromFile) {
EXPECT_TRUE(user->image_is_safe_format());
// Check image dimensions. Images can't be compared since JPEG is lossy.
const gfx::ImageSkia& saved_image = GetDefaultImage(kFirstDefaultImageIndex);
- EXPECT_EQ(saved_image.width(), user->GetImage().width());
- EXPECT_EQ(saved_image.height(), user->GetImage().height());
+ EXPECT_EQ(saved_image.width(), user->image().width());
+ EXPECT_EQ(saved_image.height(), user->image().height());
}
IN_PROC_BROWSER_TEST_F(UserImageManagerTest, PRE_SaveUserDefaultImageIndex) {
@@ -403,7 +403,7 @@ IN_PROC_BROWSER_TEST_F(UserImageManagerTest, SaveUserDefaultImageIndex) {
EXPECT_TRUE(user->HasDefaultImage());
EXPECT_EQ(kFirstDefaultImageIndex, user->image_index());
- EXPECT_TRUE(test::AreImagesEqual(default_image, user->GetImage()));
+ EXPECT_TRUE(test::AreImagesEqual(default_image, user->image()));
ExpectNewUserImageInfo(kTestUser1, kFirstDefaultImageIndex, base::FilePath());
}
@@ -432,7 +432,7 @@ IN_PROC_BROWSER_TEST_F(UserImageManagerTest, SaveUserImage) {
EXPECT_FALSE(user->HasDefaultImage());
EXPECT_EQ(User::kExternalImageIndex, user->image_index());
- EXPECT_TRUE(test::AreImagesEqual(custom_image, user->GetImage()));
+ EXPECT_TRUE(test::AreImagesEqual(custom_image, user->image()));
ExpectNewUserImageInfo(kTestUser1,
User::kExternalImageIndex,
GetUserImagePath(kTestUser1, "jpg"));
@@ -470,7 +470,7 @@ IN_PROC_BROWSER_TEST_F(UserImageManagerTest, SaveUserImageFromFile) {
EXPECT_FALSE(user->HasDefaultImage());
EXPECT_EQ(User::kExternalImageIndex, user->image_index());
- EXPECT_TRUE(test::AreImagesEqual(*custom_image, user->GetImage()));
+ EXPECT_TRUE(test::AreImagesEqual(*custom_image, user->image()));
ExpectNewUserImageInfo(kTestUser1,
User::kExternalImageIndex,
GetUserImagePath(kTestUser1, "jpg"));
@@ -514,7 +514,7 @@ IN_PROC_BROWSER_TEST_F(UserImageManagerTest, SaveUserImageFromProfileImage) {
EXPECT_FALSE(user->HasDefaultImage());
EXPECT_EQ(User::kProfileImageIndex, user->image_index());
- EXPECT_TRUE(test::AreImagesEqual(profile_image, user->GetImage()));
+ EXPECT_TRUE(test::AreImagesEqual(profile_image, user->image()));
ExpectNewUserImageInfo(kTestUser1,
User::kProfileImageIndex,
GetUserImagePath(kTestUser1, "jpg"));
@@ -564,7 +564,7 @@ IN_PROC_BROWSER_TEST_F(UserImageManagerTest,
EXPECT_TRUE(user->HasDefaultImage());
EXPECT_EQ(kFirstDefaultImageIndex, user->image_index());
- EXPECT_TRUE(test::AreImagesEqual(default_image, user->GetImage()));
+ EXPECT_TRUE(test::AreImagesEqual(default_image, user->image()));
ExpectNewUserImageInfo(kTestUser1, kFirstDefaultImageIndex, base::FilePath());
}
@@ -679,7 +679,7 @@ IN_PROC_BROWSER_TEST_F(UserImageManagerPolicyTest, SetAndClear) {
EXPECT_FALSE(user->HasDefaultImage());
EXPECT_EQ(User::kExternalImageIndex, user->image_index());
- EXPECT_TRUE(test::AreImagesEqual(*policy_image_, user->GetImage()));
+ EXPECT_TRUE(test::AreImagesEqual(*policy_image_, user->image()));
ExpectNewUserImageInfo(kTestUser1,
User::kExternalImageIndex,
GetUserImagePath(kTestUser1, "jpg"));
@@ -707,7 +707,7 @@ IN_PROC_BROWSER_TEST_F(UserImageManagerPolicyTest, SetAndClear) {
EXPECT_FALSE(user->HasDefaultImage());
EXPECT_EQ(User::kExternalImageIndex, user->image_index());
- EXPECT_TRUE(test::AreImagesEqual(*policy_image_, user->GetImage()));
+ EXPECT_TRUE(test::AreImagesEqual(*policy_image_, user->image()));
ExpectNewUserImageInfo(kTestUser1,
User::kExternalImageIndex,
GetUserImagePath(kTestUser1, "jpg"));
@@ -730,7 +730,7 @@ IN_PROC_BROWSER_TEST_F(UserImageManagerPolicyTest, SetAndClear) {
EXPECT_TRUE(user->HasDefaultImage());
EXPECT_EQ(kFirstDefaultImageIndex, user->image_index());
- EXPECT_TRUE(test::AreImagesEqual(default_image, user->GetImage()));
+ EXPECT_TRUE(test::AreImagesEqual(default_image, user->image()));
ExpectNewUserImageInfo(kTestUser1, kFirstDefaultImageIndex, base::FilePath());
}
@@ -763,7 +763,7 @@ IN_PROC_BROWSER_TEST_F(UserImageManagerPolicyTest, PolicyOverridesUser) {
EXPECT_TRUE(user->HasDefaultImage());
EXPECT_EQ(kFirstDefaultImageIndex, user->image_index());
- EXPECT_TRUE(test::AreImagesEqual(default_image, user->GetImage()));
+ EXPECT_TRUE(test::AreImagesEqual(default_image, user->image()));
ExpectNewUserImageInfo(kTestUser1, kFirstDefaultImageIndex, base::FilePath());
// Set policy. Verify that the policy-provided user image is downloaded, set
@@ -779,7 +779,7 @@ IN_PROC_BROWSER_TEST_F(UserImageManagerPolicyTest, PolicyOverridesUser) {
EXPECT_FALSE(user->HasDefaultImage());
EXPECT_EQ(User::kExternalImageIndex, user->image_index());
- EXPECT_TRUE(test::AreImagesEqual(*policy_image_, user->GetImage()));
+ EXPECT_TRUE(test::AreImagesEqual(*policy_image_, user->image()));
ExpectNewUserImageInfo(kTestUser1,
User::kExternalImageIndex,
GetUserImagePath(kTestUser1, "jpg"));
@@ -825,7 +825,7 @@ IN_PROC_BROWSER_TEST_F(UserImageManagerPolicyTest, UserDoesNotOverridePolicy) {
EXPECT_FALSE(user->HasDefaultImage());
EXPECT_EQ(User::kExternalImageIndex, user->image_index());
- EXPECT_TRUE(test::AreImagesEqual(*policy_image_, user->GetImage()));
+ EXPECT_TRUE(test::AreImagesEqual(*policy_image_, user->image()));
ExpectNewUserImageInfo(kTestUser1,
User::kExternalImageIndex,
GetUserImagePath(kTestUser1, "jpg"));
@@ -846,7 +846,7 @@ IN_PROC_BROWSER_TEST_F(UserImageManagerPolicyTest, UserDoesNotOverridePolicy) {
EXPECT_FALSE(user->HasDefaultImage());
EXPECT_EQ(User::kExternalImageIndex, user->image_index());
- EXPECT_TRUE(test::AreImagesEqual(*policy_image_, user->GetImage()));
+ EXPECT_TRUE(test::AreImagesEqual(*policy_image_, user->image()));
ExpectNewUserImageInfo(kTestUser1,
User::kExternalImageIndex,
GetUserImagePath(kTestUser1, "jpg"));
diff --git a/chrome/browser/chromeos/login/user_image_manager_impl.cc b/chrome/browser/chromeos/login/user_image_manager_impl.cc
index 5ead90d..ea729c7 100644
--- a/chrome/browser/chromeos/login/user_image_manager_impl.cc
+++ b/chrome/browser/chromeos/login/user_image_manager_impl.cc
@@ -858,7 +858,7 @@ void UserImageManagerImpl::TryToInitDownloadedProfileImage() {
// user if it has not been initialized already, the user image is the
// profile image and the user image has been loaded successfully.
VLOG(1) << "Profile image initialized from disk.";
- downloaded_profile_image_ = user->GetImage();
+ downloaded_profile_image_ = user->image();
profile_image_url_ = user->image_url();
}
}
diff --git a/chrome/browser/chromeos/memory/oom_priority_manager.cc b/chrome/browser/chromeos/memory/oom_priority_manager.cc
index a6d408c..d182ebf 100644
--- a/chrome/browser/chromeos/memory/oom_priority_manager.cc
+++ b/chrome/browser/chromeos/memory/oom_priority_manager.cc
@@ -9,7 +9,7 @@
#include <vector>
#include "ash/multi_profile_uma.h"
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
diff --git a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
index e439529..793ccca 100644
--- a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
+++ b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
@@ -1040,7 +1040,7 @@ IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, UserAvatarImage) {
EXPECT_FALSE(user->HasDefaultImage());
EXPECT_EQ(chromeos::User::kExternalImageIndex, user->image_index());
- EXPECT_TRUE(chromeos::test::AreImagesEqual(*policy_image, user->GetImage()));
+ EXPECT_TRUE(chromeos::test::AreImagesEqual(*policy_image, user->image()));
const base::DictionaryValue* images_pref =
g_browser_process->local_state()->GetDictionary("user_image_info");
ASSERT_TRUE(images_pref);
diff --git a/chrome/browser/chromeos/profiles/profile_list_chromeos.cc b/chrome/browser/chromeos/profiles/profile_list_chromeos.cc
index 5860dda..992e758 100644
--- a/chrome/browser/chromeos/profiles/profile_list_chromeos.cc
+++ b/chrome/browser/chromeos/profiles/profile_list_chromeos.cc
@@ -50,7 +50,7 @@ void ProfileListChromeOS::RebuildMenu() {
size_t i = profile_info_->GetIndexOfProfileWithPath(
ProfileHelper::GetProfilePathByUserIdHash((*it)->username_hash()));
- gfx::Image icon = gfx::Image((*it)->GetImage());
+ gfx::Image icon = gfx::Image((*it)->image());
if (!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kNewProfileManagement)) {
// old avatar menu uses resized-small images
diff --git a/chrome/browser/idle_chromeos.cc b/chrome/browser/idle_chromeos.cc
index 62a72d4..36a33a5 100644
--- a/chrome/browser/idle_chromeos.cc
+++ b/chrome/browser/idle_chromeos.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/idle.h"
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "base/time/time.h"
#include "ui/wm/core/user_activity_detector.h"
diff --git a/chrome/browser/notifications/message_center_settings_controller.cc b/chrome/browser/notifications/message_center_settings_controller.cc
index d92a92e..9f1e26f 100644
--- a/chrome/browser/notifications/message_center_settings_controller.cc
+++ b/chrome/browser/notifications/message_center_settings_controller.cc
@@ -475,12 +475,12 @@ void MessageCenterSettingsController::CreateNotifierGroupForGuestLogin() {
chromeos::User* user = user_manager->GetActiveUser();
Profile* profile = user_manager->GetProfileByUser(user);
DCHECK(profile);
- notifier_groups_.push_back(
- new message_center::ProfileNotifierGroup(gfx::Image(user->GetImage()),
- user->GetDisplayName(),
- user->GetDisplayName(),
- 0,
- profile));
+ notifier_groups_.push_back(new message_center::ProfileNotifierGroup(
+ gfx::Image(user->image()),
+ user->GetDisplayName(),
+ user->GetDisplayName(),
+ 0,
+ profile));
FOR_EACH_OBSERVER(message_center::NotifierSettingsObserver,
observers_,
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc b/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc
index 8d56f0a..84a5fd7 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/ui/ash/multi_user/multi_user_context_menu.h"
#include "ash/multi_profile_uma.h"
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "base/bind.h"
#include "base/callback.h"
@@ -87,13 +87,13 @@ scoped_ptr<ui::MenuModel> CreateMultiUserContextMenu(aura::Window* window) {
new chromeos::MultiUserContextMenuChromeos(window);
model.reset(menu);
for (int user_index = 1; user_index < logged_in_users; ++user_index) {
- const ash::UserInfo* user_info = delegate->GetUserInfo(user_index);
- menu->AddItem(user_index == 1 ? IDC_VISIT_DESKTOP_OF_LRU_USER_2
- : IDC_VISIT_DESKTOP_OF_LRU_USER_3,
- l10n_util::GetStringFUTF16(
- IDS_VISIT_DESKTOP_OF_LRU_USER,
- user_info->GetDisplayName(),
- base::ASCIIToUTF16(user_info->GetEmail())));
+ menu->AddItem(
+ user_index == 1 ? IDC_VISIT_DESKTOP_OF_LRU_USER_2 :
+ IDC_VISIT_DESKTOP_OF_LRU_USER_3,
+ l10n_util::GetStringFUTF16(
+ IDS_VISIT_DESKTOP_OF_LRU_USER,
+ delegate->GetUserDisplayName(user_index),
+ base::ASCIIToUTF16(delegate->GetUserEmail(user_index))));
}
}
return model.Pass();
@@ -118,11 +118,8 @@ void ExecuteVisitDesktopCommand(int command_id, aura::Window* window) {
// When running the multi user mode on Chrome OS, windows can "visit"
// another user's desktop.
const std::string& user_id =
- ash::Shell::GetInstance()
- ->session_state_delegate()
- ->GetUserInfo(IDC_VISIT_DESKTOP_OF_LRU_USER_2 == command_id ? 1
- : 2)
- ->GetUserID();
+ ash::Shell::GetInstance()->session_state_delegate()->GetUserID(
+ IDC_VISIT_DESKTOP_OF_LRU_USER_2 == command_id ? 1 : 2);
base::Callback<void(bool)> on_accept =
base::Bind(&OnAcceptTeleportWarning, user_id, window);
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc b/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc
index aa5e7c6..2d1bc91 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc
@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/session/session_state_delegate.h"
-#include "ash/session/user_info.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/system/system_notifier.h"
#include "ash/test/ash_test_base.h"
@@ -65,10 +64,7 @@ class MultiUserNotificationBlockerChromeOSTest
}
const std::string GetDefaultUserId() {
- return ash::Shell::GetInstance()
- ->session_state_delegate()
- ->GetUserInfo(0)
- ->GetUserID();
+ return ash::Shell::GetInstance()->session_state_delegate()->GetUserID(0);
}
const message_center::NotificationBlocker* blocker() {
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc
index 93b2af1..fc269782 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc
@@ -10,8 +10,7 @@
#if defined(OS_CHROMEOS)
#include "ash/ash_switches.h"
#include "ash/multi_profile_uma.h"
-#include "ash/session/session_state_delegate.h"
-#include "ash/session/user_info.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/shell_delegate.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h"
@@ -42,11 +41,8 @@ MultiUserWindowManager* MultiUserWindowManager::CreateInstance() {
ash::MultiProfileUMA::SESSION_SINGLE_USER_MODE;
if (!g_instance &&
ash::Shell::GetInstance()->delegate()->IsMultiProfilesEnabled()) {
- g_instance =
- new MultiUserWindowManagerChromeOS(ash::Shell::GetInstance()
- ->session_state_delegate()
- ->GetUserInfo(0)
- ->GetUserID());
+ g_instance = new MultiUserWindowManagerChromeOS(
+ ash::Shell::GetInstance()->session_state_delegate()->GetUserID(0));
multi_user_mode_ = MULTI_PROFILE_MODE_SEPARATED;
mode = ash::MultiProfileUMA::SESSION_SEPARATE_DESKTOP_MODE;
} else if (ash::Shell::GetInstance()->delegate()->IsMultiProfilesEnabled()) {
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
index 50480bcc..d1e344e4 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
@@ -9,7 +9,7 @@
#include "ash/ash_switches.h"
#include "ash/multi_profile_uma.h"
#include "ash/root_window_controller.h"
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#include "ash/shelf/shelf.h"
#include "ash/shell.h"
#include "ash/shell_delegate.h"
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h
index 4812431..66a89cc 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h
+++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h
@@ -8,7 +8,7 @@
#include <map>
#include <string>
-#include "ash/session/session_state_observer.h"
+#include "ash/session_state_observer.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc
index 8dc3171..44fe75c 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/session/user_info.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/test/ash_test_base.h"
@@ -103,8 +102,7 @@ class MultiUserWindowManagerChromeOSTest : public AshTestBase {
// manager. This function gets the current user from it and also sets it to
// the multi user window manager.
std::string GetAndValidateCurrentUserFromSessionStateObserver() {
- const std::string& user =
- session_state_delegate()->GetActiveUserInfo()->GetUserID();
+ const std::string& user = session_state_delegate()->get_activated_user();
if (user != multi_user_window_manager_->GetCurrentUserForTest())
multi_user_window_manager()->ActiveUserChanged(user);
return user;
@@ -150,9 +148,6 @@ void MultiUserWindowManagerChromeOSTest::SetUp() {
session_state_delegate_ =
static_cast<TestSessionStateDelegate*> (
ash::Shell::GetInstance()->session_state_delegate());
- session_state_delegate_->AddUser("a");
- session_state_delegate_->AddUser("b");
- session_state_delegate_->AddUser("c");
}
void MultiUserWindowManagerChromeOSTest::SetUpForThisManyWindows(int windows) {
@@ -648,11 +643,11 @@ TEST_F(MultiUserWindowManagerChromeOSTest, SwitchUsersUponModalityChange) {
// Making the window system modal should not change anything.
MakeWindowSystemModal(window(0));
- EXPECT_EQ("a", session_state_delegate()->GetActiveUserInfo()->GetUserID());
+ EXPECT_EQ("a", session_state_delegate()->get_activated_user());
// Making the window owned by user B should switch users.
multi_user_window_manager()->SetWindowOwner(window(0), "b");
- EXPECT_EQ("b", session_state_delegate()->GetActiveUserInfo()->GetUserID());
+ EXPECT_EQ("b", session_state_delegate()->get_activated_user());
}
// Test that a system modal dialog will not switch desktop if active user has
@@ -663,11 +658,11 @@ TEST_F(MultiUserWindowManagerChromeOSTest, DontSwitchUsersUponModalityChange) {
// Making the window system modal should not change anything.
MakeWindowSystemModal(window(0));
- EXPECT_EQ("a", session_state_delegate()->GetActiveUserInfo()->GetUserID());
+ EXPECT_EQ("a", session_state_delegate()->get_activated_user());
// Making the window owned by user a should not switch users.
multi_user_window_manager()->SetWindowOwner(window(0), "a");
- EXPECT_EQ("a", session_state_delegate()->GetActiveUserInfo()->GetUserID());
+ EXPECT_EQ("a", session_state_delegate()->get_activated_user());
}
// Test that a system modal dialog will not switch if shown on correct desktop
@@ -683,7 +678,7 @@ TEST_F(MultiUserWindowManagerChromeOSTest,
MakeWindowSystemModal(window(0));
// Showing the window should trigger no user switch.
window(0)->Show();
- EXPECT_EQ("a", session_state_delegate()->GetActiveUserInfo()->GetUserID());
+ EXPECT_EQ("a", session_state_delegate()->get_activated_user());
}
// Test that a system modal dialog will switch if shown on incorrect desktop but
@@ -699,7 +694,7 @@ TEST_F(MultiUserWindowManagerChromeOSTest,
MakeWindowSystemModal(window(0));
// Showing the window should trigger a user switch.
window(0)->Show();
- EXPECT_EQ("b", session_state_delegate()->GetActiveUserInfo()->GetUserID());
+ EXPECT_EQ("b", session_state_delegate()->get_activated_user());
}
// Test that using the full user switch animations are working as expected.
diff --git a/chrome/browser/ui/ash/session_state_delegate_chromeos.cc b/chrome/browser/ui/ash/session_state_delegate_chromeos.cc
index 8679a41..07997ea 100644
--- a/chrome/browser/ui/ash/session_state_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/session_state_delegate_chromeos.cc
@@ -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 @@ SessionStateDelegateChromeos::GetSessionState() const {
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);
}
diff --git a/chrome/browser/ui/ash/session_state_delegate_chromeos.h b/chrome/browser/ui/ash/session_state_delegate_chromeos.h
index 2b28c0d..913462b 100644
--- a/chrome/browser/ui/ash/session_state_delegate_chromeos.h
+++ b/chrome/browser/ui/ash/session_state_delegate_chromeos.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_
#define CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/observer_list.h"
@@ -41,11 +41,17 @@ class SessionStateDelegateChromeos
virtual void UnlockScreen() OVERRIDE;
virtual bool IsUserSessionBlocked() const OVERRIDE;
virtual SessionState GetSessionState() const OVERRIDE;
- virtual const ash::UserInfo* GetUserInfo(
+ virtual const base::string16 GetUserDisplayName(
ash::MultiProfileIndex index) const OVERRIDE;
- virtual const ash::UserInfo* GetUserInfo(
+ virtual const base::string16 GetUserGivenName(
+ ash::MultiProfileIndex index) const OVERRIDE;
+ virtual const std::string GetUserEmail(
+ ash::MultiProfileIndex index) const OVERRIDE;
+ virtual const std::string GetUserID(
+ ash::MultiProfileIndex index) const OVERRIDE;
+ virtual const gfx::ImageSkia& GetUserImage(
content::BrowserContext* context) const OVERRIDE;
- virtual bool ShouldShowAvatar(aura::Window* window) const OVERRIDE;
+ virtual bool ShouldShowAvatar(aura::Window* window) OVERRIDE;
virtual void SwitchActiveUser(const std::string& user_id) OVERRIDE;
virtual void CycleActiveUser(CycleUser cycle_user) OVERRIDE;
virtual void AddSessionStateObserver(
diff --git a/chrome/browser/ui/ash/session_state_delegate_views.cc b/chrome/browser/ui/ash/session_state_delegate_views.cc
index 2be4389..e3e86b1 100644
--- a/chrome/browser/ui/ash/session_state_delegate_views.cc
+++ b/chrome/browser/ui/ash/session_state_delegate_views.cc
@@ -4,50 +4,15 @@
#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 {
-
-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
+// This isn't really used. It is mainly here to make the compiler happy.
+gfx::ImageSkia null_image;
+}
SessionStateDelegate::SessionStateDelegate() {
}
@@ -106,18 +71,38 @@ ash::SessionStateDelegate::SessionState SessionStateDelegate::GetSessionState()
return SESSION_STATE_ACTIVE;
}
-const ash::UserInfo* SessionStateDelegate::GetUserInfo(
+const base::string16 SessionStateDelegate::GetUserDisplayName(
+ ash::MultiProfileIndex index) const {
+ NOTIMPLEMENTED();
+ return base::UTF8ToUTF16("");
+}
+
+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 {
- return GetUserInfo(NULL);
+ NOTIMPLEMENTED();
+ return "";
}
-const ash::UserInfo* SessionStateDelegate::GetUserInfo(
+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;
}
diff --git a/chrome/browser/ui/ash/session_state_delegate_views.h b/chrome/browser/ui/ash/session_state_delegate_views.h
index 717fa61..8f6ac61 100644
--- a/chrome/browser/ui/ash/session_state_delegate_views.h
+++ b/chrome/browser/ui/ash/session_state_delegate_views.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_VIEWS_H_
#define CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_VIEWS_H_
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/observer_list.h"
@@ -34,11 +34,17 @@ class SessionStateDelegate : public ash::SessionStateDelegate {
virtual void UnlockScreen() OVERRIDE;
virtual bool IsUserSessionBlocked() const OVERRIDE;
virtual SessionState GetSessionState() const OVERRIDE;
- virtual const ash::UserInfo* GetUserInfo(
+ virtual const base::string16 GetUserDisplayName(
ash::MultiProfileIndex index) const OVERRIDE;
- virtual const ash::UserInfo* GetUserInfo(
+ virtual const base::string16 GetUserGivenName(
+ ash::MultiProfileIndex index) const OVERRIDE;
+ virtual const std::string GetUserEmail(
+ ash::MultiProfileIndex index) const OVERRIDE;
+ virtual const std::string GetUserID(
+ ash::MultiProfileIndex index) const OVERRIDE;
+ virtual const gfx::ImageSkia& GetUserImage(
content::BrowserContext* context) const OVERRIDE;
- virtual bool ShouldShowAvatar(aura::Window* window) const OVERRIDE;
+ virtual bool ShouldShowAvatar(aura::Window* window) OVERRIDE;
virtual void SwitchActiveUser(const std::string& user_id) OVERRIDE;
virtual void CycleActiveUser(CycleUser cycle_user) OVERRIDE;
virtual void AddSessionStateObserver(
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index 02eaccd..000bd67 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -14,8 +14,8 @@
#include "ash/ime/input_method_menu_item.h"
#include "ash/ime/input_method_menu_manager.h"
#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/session/session_state_delegate.h"
-#include "ash/session/session_state_observer.h"
+#include "ash/session_state_delegate.h"
+#include "ash/session_state_observer.h"
#include "ash/shell.h"
#include "ash/shell_delegate.h"
#include "ash/shell_window_ids.h"
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.h b/chrome/browser/ui/ash/system_tray_delegate_chromeos.h
index 378df87..8a1fc30 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.h
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.h
@@ -7,7 +7,7 @@
#include "apps/app_window_registry.h"
#include "ash/ime/input_method_menu_manager.h"
-#include "ash/session/session_state_observer.h"
+#include "ash/session_state_observer.h"
#include "ash/system/tray/system_tray.h"
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/system_tray_notifier.h"
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index 14ee6d5..fc95256 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -61,7 +61,7 @@
#if defined(OS_CHROMEOS)
#include "ash/multi_profile_uma.h"
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_context_menu.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
diff --git a/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc b/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
index 6b858b7..b1f8062 100644
--- a/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
+++ b/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h"
#include "ash/root_window_controller.h"
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "base/command_line.h"
#include "base/lazy_instance.h"
diff --git a/chrome/browser/ui/views/frame/browser_frame.cc b/chrome/browser/ui/views/frame/browser_frame.cc
index 4b4606c..585a12c 100644
--- a/chrome/browser/ui/views/frame/browser_frame.cc
+++ b/chrome/browser/ui/views/frame/browser_frame.cc
@@ -44,7 +44,7 @@
#endif
#if defined(OS_CHROMEOS)
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#endif
#if defined(USE_X11)
diff --git a/chrome/browser/ui/views/frame/system_menu_model_builder.cc b/chrome/browser/ui/views/frame/system_menu_model_builder.cc
index 44dacd8..69b63b8 100644
--- a/chrome/browser/ui/views/frame/system_menu_model_builder.cc
+++ b/chrome/browser/ui/views/frame/system_menu_model_builder.cc
@@ -16,8 +16,7 @@
#include "ui/base/models/simple_menu_model.h"
#if defined(OS_CHROMEOS)
-#include "ash/session/session_state_delegate.h"
-#include "ash/session/user_info.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
@@ -152,13 +151,13 @@ void SystemMenuModelBuilder::AppendTeleportMenu(ui::SimpleMenuModel* model) {
model->AddSeparator(ui::NORMAL_SEPARATOR);
DCHECK(logged_in_users <= 3);
for (int user_index = 1; user_index < logged_in_users; ++user_index) {
- const ash::UserInfo* user_info = delegate->GetUserInfo(user_index);
model->AddItem(
- user_index == 1 ? IDC_VISIT_DESKTOP_OF_LRU_USER_2
- : IDC_VISIT_DESKTOP_OF_LRU_USER_3,
- l10n_util::GetStringFUTF16(IDS_VISIT_DESKTOP_OF_LRU_USER,
- user_info->GetDisplayName(),
- base::ASCIIToUTF16(user_info->GetEmail())));
+ user_index == 1 ? IDC_VISIT_DESKTOP_OF_LRU_USER_2 :
+ IDC_VISIT_DESKTOP_OF_LRU_USER_3,
+ l10n_util::GetStringFUTF16(
+ IDS_VISIT_DESKTOP_OF_LRU_USER,
+ delegate->GetUserDisplayName(user_index),
+ base::ASCIIToUTF16(delegate->GetUserEmail(user_index))));
}
#endif
}
diff --git a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
index 554839b..2c0732e 100644
--- a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
@@ -269,13 +269,13 @@ void ChangePictureOptionsHandler::SendSelectedImage() {
switch (previous_image_index_) {
case User::kExternalImageIndex: {
// User has image from camera/file, record it and add to the image list.
- previous_image_ = user->GetImage();
+ previous_image_ = user->image();
SendOldImage(webui::GetBitmapDataUrl(*previous_image_.bitmap()));
break;
}
case User::kProfileImageIndex: {
// User has his/her Profile image as the current image.
- SendProfileImage(user->GetImage(), true);
+ SendProfileImage(user->image(), true);
break;
}
default: {
diff --git a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
index 5771c5e..4e3e98a 100644
--- a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
@@ -6,7 +6,7 @@
#include <string>
-#include "ash/session/session_state_delegate.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "base/bind.h"
#include "base/prefs/pref_change_registrar.h"