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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698