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

Unified Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 9812026: chromeos: Do not create the profile too early. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698