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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 custodian_info_changed_observers_.RemoveObserver(observer); | 833 custodian_info_changed_observers_.RemoveObserver(observer); |
834 } | 834 } |
835 | 835 |
836 void SystemTrayDelegateChromeOS::UserAddedToSession( | 836 void SystemTrayDelegateChromeOS::UserAddedToSession( |
837 const user_manager::User* active_user) { | 837 const user_manager::User* active_user) { |
838 } | 838 } |
839 | 839 |
840 void SystemTrayDelegateChromeOS::UserChangedSupervisedStatus( | 840 void SystemTrayDelegateChromeOS::UserChangedSupervisedStatus( |
841 user_manager::User* user) { | 841 user_manager::User* user) { |
842 Profile* user_profile = ProfileHelper::Get()->GetProfileByUser(user); | 842 Profile* user_profile = ProfileHelper::Get()->GetProfileByUser(user); |
843 DCHECK(user_profile); | |
844 | 843 |
845 if (session_started_ && user_profile_ == user_profile) { | 844 // Returned user_profile might be NULL on restoring Users on browser start. |
| 845 // At some point profile is not yet fully initiated. |
| 846 if (session_started_ && |
| 847 user_profile != NULL && |
| 848 user_profile_ == user_profile) { |
846 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange( | 849 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange( |
847 GetUserLoginStatus()); | 850 GetUserLoginStatus()); |
848 } | 851 } |
849 } | 852 } |
850 | 853 |
851 ash::SystemTray* SystemTrayDelegateChromeOS::GetPrimarySystemTray() { | 854 ash::SystemTray* SystemTrayDelegateChromeOS::GetPrimarySystemTray() { |
852 return ash::Shell::GetInstance()->GetPrimarySystemTray(); | 855 return ash::Shell::GetInstance()->GetPrimarySystemTray(); |
853 } | 856 } |
854 | 857 |
855 ash::SystemTrayNotifier* SystemTrayDelegateChromeOS::GetSystemTrayNotifier() { | 858 ash::SystemTrayNotifier* SystemTrayDelegateChromeOS::GetSystemTrayNotifier() { |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1291 accessibility_subscription_.reset(); | 1294 accessibility_subscription_.reset(); |
1292 else | 1295 else |
1293 OnAccessibilityModeChanged(details.notify); | 1296 OnAccessibilityModeChanged(details.notify); |
1294 } | 1297 } |
1295 | 1298 |
1296 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1299 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
1297 return new SystemTrayDelegateChromeOS(); | 1300 return new SystemTrayDelegateChromeOS(); |
1298 } | 1301 } |
1299 | 1302 |
1300 } // namespace chromeos | 1303 } // namespace chromeos |
OLD | NEW |