Index: chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
index 093993ee37f2fe0560a93e8a3123c0c845f92537..a3cd011f5383da6a87ad34c0b933d8960d225867 100644 |
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
@@ -124,12 +124,15 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
registrar_.Add(this, |
chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, |
content::NotificationService::AllSources()); |
+ if (GetUserLoginStatus() == ash::user::LOGGED_IN_NONE) { |
+ registrar_.Add(this, |
+ chrome::NOTIFICATION_SESSION_STARTED, |
+ content::NotificationService::AllSources()); |
+ } |
registrar_.Add(this, |
- chrome::NOTIFICATION_SESSION_STARTED, |
+ chrome::NOTIFICATION_PROFILE_CREATED, |
content::NotificationService::AllSources()); |
- SetProfile(ProfileManager::GetDefaultProfile()); |
- |
network_icon_large_->SetResourceSize(NetworkMenuIcon::SIZE_LARGE); |
accessibility_enabled_.Init(prefs::kSpokenFeedbackEnabled, |
@@ -620,6 +623,13 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
} |
break; |
} |
+ case chrome::NOTIFICATION_PROFILE_CREATED: { |
+ SetProfile(content::Source<Profile>(source).ptr()); |
+ registrar_.Remove(this, |
+ chrome::NOTIFICATION_PROFILE_CREATED, |
+ content::NotificationService::AllSources()); |
+ break; |
+ } |
case chrome::NOTIFICATION_SESSION_STARTED: { |
SetProfile(ProfileManager::GetDefaultProfile()); |
break; |