diff options
author | alemate <alemate@chromium.org> | 2015-11-11 19:15:16 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-12 03:16:34 +0000 |
commit | cdf46dd1677ae5a8974fb4b1677b39d89f973a36 (patch) | |
tree | 28d62ed373755b37c6aa258744e6ba6472e49b9f /ash/system | |
parent | aac646a4593a4786d230b62e86f60f3fcf952854 (diff) | |
download | chromium_src-cdf46dd1677ae5a8974fb4b1677b39d89f973a36.zip chromium_src-cdf46dd1677ae5a8974fb4b1677b39d89f973a36.tar.gz chromium_src-cdf46dd1677ae5a8974fb4b1677b39d89f973a36.tar.bz2 |
This CL replaces std::string user_id in ash/* with AccountId.
This CL replaces most of ASH temporary AccountId to/from email transformations
with AccountId references. It also replaces strings in multi_user_util
with AccountId objects.
This is part of transition to AccountId.
BUG=468875
TEST=manual
Review URL: https://codereview.chromium.org/1428213004
Cr-Commit-Position: refs/heads/master@{#359225}
Diffstat (limited to 'ash/system')
-rw-r--r-- | ash/system/tray/system_tray_delegate.cc | 2 | ||||
-rw-r--r-- | ash/system/tray/system_tray_delegate.h | 4 | ||||
-rw-r--r-- | ash/system/user/tray_user.cc | 2 | ||||
-rw-r--r-- | ash/system/user/user_view.cc | 3 |
4 files changed, 6 insertions, 5 deletions
diff --git a/ash/system/tray/system_tray_delegate.cc b/ash/system/tray/system_tray_delegate.cc index 314817e..15e7304 100644 --- a/ash/system/tray/system_tray_delegate.cc +++ b/ash/system/tray/system_tray_delegate.cc @@ -259,7 +259,7 @@ bool SystemTrayDelegate::IsSearchKeyMappedToCapsLock() { } tray::UserAccountsDelegate* SystemTrayDelegate::GetUserAccountsDelegate( - const std::string& user_id) { + const AccountId& account_id) { return nullptr; } diff --git a/ash/system/tray/system_tray_delegate.h b/ash/system/tray/system_tray_delegate.h index 9859a48..9b05286 100644 --- a/ash/system/tray/system_tray_delegate.h +++ b/ash/system/tray/system_tray_delegate.h @@ -18,6 +18,8 @@ #include "base/strings/string16.h" #include "ui/gfx/image/image_skia.h" +class AccountId; + namespace base { class TimeDelta; class TimeTicks; @@ -314,7 +316,7 @@ class ASH_EXPORT SystemTrayDelegate { // Returns accounts delegate for given user. May return nullptr. virtual tray::UserAccountsDelegate* GetUserAccountsDelegate( - const std::string& user_id); + const AccountId& account_id); // Adding observers that are notified when supervised info is being changed. virtual void AddCustodianInfoTrayObserver( diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc index 06d1823..e947641 100644 --- a/ash/system/user/tray_user.cc +++ b/ash/system/user/tray_user.cc @@ -119,7 +119,7 @@ views::View* TrayUser::CreateDetailedView(user::LoginStatus status) { ->GetAccountId(); tray::UserAccountsDelegate* delegate = Shell::GetInstance()->system_tray_delegate()->GetUserAccountsDelegate( - account_id.GetUserEmail()); + account_id); if (!delegate) return nullptr; return new tray::AccountsDetailedView(this, status, delegate); diff --git a/ash/system/user/user_view.cc b/ash/system/user/user_view.cc index 0c48ca9..1b65bd5 100644 --- a/ash/system/user/user_view.cc +++ b/ash/system/user/user_view.cc @@ -78,8 +78,7 @@ void SwitchUser(ash::UserIndex user_index) { ash::Shell::GetInstance()->session_state_delegate(); ash::MultiProfileUMA::RecordSwitchActiveUser( ash::MultiProfileUMA::SWITCH_ACTIVE_USER_BY_TRAY); - delegate->SwitchActiveUser( - delegate->GetUserInfo(user_index)->GetAccountId().GetUserEmail()); + delegate->SwitchActiveUser(delegate->GetUserInfo(user_index)->GetAccountId()); } class LogoutButton : public TrayPopupLabelButton { |