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

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

Issue 785893003: Adapt Chrome OS related part of ChildAccountService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: User type check removed. Created 6 years 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 a02c7c7da1c1d48ab445ed3f800b488c3d2ea877..fafafcc7e028713ee7cd9cc3856eb131b757c17d 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -840,9 +840,12 @@ void SystemTrayDelegateChromeOS::UserAddedToSession(
void SystemTrayDelegateChromeOS::UserChangedSupervisedStatus(
user_manager::User* user) {
Profile* user_profile = ProfileHelper::Get()->GetProfileByUser(user);
- DCHECK(user_profile);
- if (session_started_ && user_profile_ == user_profile) {
+ // Returned user_profile might be NULL on restoring Users on browser start.
+ // At some point profile is not yet fully initiated.
+ if (session_started_ &&
+ user_profile != NULL &&
+ user_profile_ == user_profile) {
ash::Shell::GetInstance()->UpdateAfterLoginStatusChange(
GetUserLoginStatus());
}
« no previous file with comments | « chrome/browser/supervised_user/child_accounts/child_account_service.cc ('k') | components/user_manager/user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698