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

Unified Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 1428213004: This CL replaces std::string user_id in ash/* with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. Created 5 years, 1 month 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: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index 55d34c0910923726e0ce35f15cf687559787d56d..e54e8ff77c4feb20446f95bcc5543212fe360660 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -575,10 +575,10 @@ void SystemTrayDelegateChromeOS::ShowUserLogin() {
for (user_manager::UserList::const_iterator it = logged_in_users.begin();
it != logged_in_users.end();
++it) {
- show_intro &= !multi_user_util::GetProfileFromUserID(
- multi_user_util::GetUserIDFromEmail((*it)->email()))
- ->GetPrefs()
- ->GetBoolean(prefs::kMultiProfileNeverShowIntro);
+ show_intro &=
+ !multi_user_util::GetProfileFromAccountId((*it)->GetAccountId())
+ ->GetPrefs()
+ ->GetBoolean(prefs::kMultiProfileNeverShowIntro);
if (!show_intro)
break;
}
@@ -818,18 +818,17 @@ bool SystemTrayDelegateChromeOS::IsSearchKeyMappedToCapsLock() {
ash::tray::UserAccountsDelegate*
SystemTrayDelegateChromeOS::GetUserAccountsDelegate(
- const std::string& user_id) {
- if (!accounts_delegates_.contains(user_id)) {
- const user_manager::User* user = user_manager::UserManager::Get()->FindUser(
- AccountId::FromUserEmail(user_id));
+ const AccountId& account_id) {
+ if (!accounts_delegates_.contains(account_id)) {
+ const user_manager::User* user =
+ user_manager::UserManager::Get()->FindUser(account_id);
Profile* user_profile = ProfileHelper::Get()->GetProfileByUserUnsafe(user);
CHECK(user_profile);
accounts_delegates_.set(
- user_id,
- scoped_ptr<ash::tray::UserAccountsDelegate>(
- new UserAccountsDelegateChromeOS(user_profile)));
+ account_id, scoped_ptr<ash::tray::UserAccountsDelegate>(
+ new UserAccountsDelegateChromeOS(user_profile)));
}
- return accounts_delegates_.get(user_id);
+ return accounts_delegates_.get(account_id);
}
void SystemTrayDelegateChromeOS::AddCustodianInfoTrayObserver(
@@ -1253,13 +1252,12 @@ void SystemTrayDelegateChromeOS::OnStoreError(policy::CloudPolicyStore* store) {
// Overridden from ash::SessionStateObserver
void SystemTrayDelegateChromeOS::UserAddedToSession(
- const std::string& user_id) {
+ const AccountId& /*account_id*/) {
GetSystemTrayNotifier()->NotifyUserAddedToSession();
}
void SystemTrayDelegateChromeOS::ActiveUserChanged(
- const std::string& /* user_id */) {
-}
+ const AccountId& /* user_id */) {}
// Overridden from chrome::BrowserListObserver.
void SystemTrayDelegateChromeOS::OnBrowserRemoved(Browser* browser) {

Powered by Google App Engine
This is Rietveld 408576698