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

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

Issue 445353004: GetProfileByUser deprecated and renamed to GetProfileByUserUnsafe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 4 months 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 | Annotate | Revision Log
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 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 820
821 bool SystemTrayDelegateChromeOS::IsSearchKeyMappedToCapsLock() { 821 bool SystemTrayDelegateChromeOS::IsSearchKeyMappedToCapsLock() {
822 return search_key_mapped_to_ == input_method::kCapsLockKey; 822 return search_key_mapped_to_ == input_method::kCapsLockKey;
823 } 823 }
824 824
825 ash::tray::UserAccountsDelegate* 825 ash::tray::UserAccountsDelegate*
826 SystemTrayDelegateChromeOS::GetUserAccountsDelegate( 826 SystemTrayDelegateChromeOS::GetUserAccountsDelegate(
827 const std::string& user_id) { 827 const std::string& user_id) {
828 if (!accounts_delegates_.contains(user_id)) { 828 if (!accounts_delegates_.contains(user_id)) {
829 const user_manager::User* user = UserManager::Get()->FindUser(user_id); 829 const user_manager::User* user = UserManager::Get()->FindUser(user_id);
830 Profile* user_profile = ProfileHelper::Get()->GetProfileByUser(user); 830 Profile* user_profile = ProfileHelper::Get()->GetProfileByUserUnsafe(user);
831 CHECK(user_profile); 831 CHECK(user_profile);
832 accounts_delegates_.set( 832 accounts_delegates_.set(
833 user_id, 833 user_id,
834 scoped_ptr<ash::tray::UserAccountsDelegate>( 834 scoped_ptr<ash::tray::UserAccountsDelegate>(
835 new UserAccountsDelegateChromeOS(user_profile))); 835 new UserAccountsDelegateChromeOS(user_profile)));
836 } 836 }
837 return accounts_delegates_.get(user_id); 837 return accounts_delegates_.get(user_id);
838 } 838 }
839 839
840 ash::SystemTray* SystemTrayDelegateChromeOS::GetPrimarySystemTray() { 840 ash::SystemTray* SystemTrayDelegateChromeOS::GetPrimarySystemTray() {
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 accessibility_subscription_.reset(); 1274 accessibility_subscription_.reset();
1275 else 1275 else
1276 OnAccessibilityModeChanged(details.notify); 1276 OnAccessibilityModeChanged(details.notify);
1277 } 1277 }
1278 1278
1279 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1279 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1280 return new SystemTrayDelegateChromeOS(); 1280 return new SystemTrayDelegateChromeOS();
1281 } 1281 }
1282 1282
1283 } // namespace chromeos 1283 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698