Commit 72ae15a7 authored by sadrul@chromium.org's avatar sadrul@chromium.org

chromeos: Do not create the profile too early for the uber tray.

BUG=chromium-os:28149
TEST=manually

Review URL: https://chromiumcodereview.appspot.com/9812026

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128213 0039d316-1c4b-4281-b951-d872f2087c98
parent 1aba0bb0
...@@ -124,12 +124,15 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, ...@@ -124,12 +124,15 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
registrar_.Add(this, registrar_.Add(this,
chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED,
content::NotificationService::AllSources()); content::NotificationService::AllSources());
if (GetUserLoginStatus() == ash::user::LOGGED_IN_NONE) {
registrar_.Add(this,
chrome::NOTIFICATION_SESSION_STARTED,
content::NotificationService::AllSources());
}
registrar_.Add(this, registrar_.Add(this,
chrome::NOTIFICATION_SESSION_STARTED, chrome::NOTIFICATION_PROFILE_CREATED,
content::NotificationService::AllSources()); content::NotificationService::AllSources());
SetProfile(ProfileManager::GetDefaultProfile());
network_icon_large_->SetResourceSize(NetworkMenuIcon::SIZE_LARGE); network_icon_large_->SetResourceSize(NetworkMenuIcon::SIZE_LARGE);
accessibility_enabled_.Init(prefs::kSpokenFeedbackEnabled, accessibility_enabled_.Init(prefs::kSpokenFeedbackEnabled,
...@@ -620,6 +623,13 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, ...@@ -620,6 +623,13 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
} }
break; 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: { case chrome::NOTIFICATION_SESSION_STARTED: {
SetProfile(ProfileManager::GetDefaultProfile()); SetProfile(ProfileManager::GetDefaultProfile());
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment