| Index: chrome/browser/chromeos/login/user_manager_impl.cc
|
| diff --git a/chrome/browser/chromeos/login/user_manager_impl.cc b/chrome/browser/chromeos/login/user_manager_impl.cc
|
| index 82b48dfdb05424351bd41f91a43430ad290de4d9..d5fd7d9413c71a046b0c49d6d3b6cb3213f586b9 100644
|
| --- a/chrome/browser/chromeos/login/user_manager_impl.cc
|
| +++ b/chrome/browser/chromeos/login/user_manager_impl.cc
|
| @@ -369,13 +369,7 @@ void UserManagerImpl::SwitchActiveUser(const std::string& email) {
|
| SetLRUUser(active_user_);
|
|
|
| NotifyActiveUserHashChanged(active_user_->username_hash());
|
| -
|
| - // TODO(nkostylev): Notify session_manager on active user change.
|
| - // http://crbug.com/230857
|
| - content::NotificationService::current()->Notify(
|
| - chrome::NOTIFICATION_ACTIVE_USER_CHANGED,
|
| - content::Source<UserManager>(this),
|
| - content::Details<const User>(active_user_));
|
| + NotifyActiveUserChanged(active_user_);
|
| }
|
|
|
| void UserManagerImpl::RestoreActiveSessions() {
|
| @@ -1254,8 +1248,11 @@ void UserManagerImpl::RetailModeUserLoggedIn() {
|
| void UserManagerImpl::NotifyOnLogin() {
|
| CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| NotifyActiveUserHashChanged(active_user_->username_hash());
|
| + NotifyActiveUserChanged(active_user_);
|
|
|
| UpdateLoginState();
|
| + // TODO(nkostylev): Deprecate this notification in favor of
|
| + // ActiveUserChanged() observer call.
|
| content::NotificationService::current()->Notify(
|
| chrome::NOTIFICATION_LOGIN_USER_CHANGED,
|
| content::Source<UserManager>(this),
|
| @@ -1604,6 +1601,13 @@ void UserManagerImpl::NotifyMergeSessionStateChanged() {
|
| MergeSessionStateChanged(merge_session_state_));
|
| }
|
|
|
| +void UserManagerImpl::NotifyActiveUserChanged(const User* active_user) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + FOR_EACH_OBSERVER(UserManager::UserSessionStateObserver,
|
| + session_state_observer_list_,
|
| + ActiveUserChanged(active_user));
|
| +}
|
| +
|
| void UserManagerImpl::NotifyActiveUserHashChanged(const std::string& hash) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| FOR_EACH_OBSERVER(UserManager::UserSessionStateObserver,
|
|
|