diff options
Diffstat (limited to 'chrome/browser/ui')
18 files changed, 119 insertions, 116 deletions
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" |