OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 } | 813 } |
814 | 814 |
815 bool SystemTrayDelegateChromeOS::IsSearchKeyMappedToCapsLock() { | 815 bool SystemTrayDelegateChromeOS::IsSearchKeyMappedToCapsLock() { |
816 return search_key_mapped_to_ == input_method::kCapsLockKey; | 816 return search_key_mapped_to_ == input_method::kCapsLockKey; |
817 } | 817 } |
818 | 818 |
819 ash::tray::UserAccountsDelegate* | 819 ash::tray::UserAccountsDelegate* |
820 SystemTrayDelegateChromeOS::GetUserAccountsDelegate( | 820 SystemTrayDelegateChromeOS::GetUserAccountsDelegate( |
821 const std::string& user_id) { | 821 const std::string& user_id) { |
822 if (!accounts_delegates_.contains(user_id)) { | 822 if (!accounts_delegates_.contains(user_id)) { |
823 const user_manager::User* user = | 823 const user_manager::User* user = user_manager::UserManager::Get()->FindUser( |
824 user_manager::UserManager::Get()->FindUser(user_id); | 824 AccountId::FromUserEmail(user_id)); |
825 Profile* user_profile = ProfileHelper::Get()->GetProfileByUserUnsafe(user); | 825 Profile* user_profile = ProfileHelper::Get()->GetProfileByUserUnsafe(user); |
826 CHECK(user_profile); | 826 CHECK(user_profile); |
827 accounts_delegates_.set( | 827 accounts_delegates_.set( |
828 user_id, | 828 user_id, |
829 scoped_ptr<ash::tray::UserAccountsDelegate>( | 829 scoped_ptr<ash::tray::UserAccountsDelegate>( |
830 new UserAccountsDelegateChromeOS(user_profile))); | 830 new UserAccountsDelegateChromeOS(user_profile))); |
831 } | 831 } |
832 return accounts_delegates_.get(user_id); | 832 return accounts_delegates_.get(user_id); |
833 } | 833 } |
834 | 834 |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " | 1327 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " |
1328 << "ENABLE_SUPERVISED_USERS undefined."; | 1328 << "ENABLE_SUPERVISED_USERS undefined."; |
1329 return base::string16(); | 1329 return base::string16(); |
1330 } | 1330 } |
1331 | 1331 |
1332 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1332 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
1333 return new SystemTrayDelegateChromeOS(); | 1333 return new SystemTrayDelegateChromeOS(); |
1334 } | 1334 } |
1335 | 1335 |
1336 } // namespace chromeos | 1336 } // namespace chromeos |
OLD | NEW |