Commit 9450f29e authored by noms@chromium.org's avatar noms@chromium.org

Add a new method to the ProfileInfoCacheObserver for signin status changes.

BUG=332155
TBR=nkostylev@chromium.org
TEST=With the --new-profile-management flag set, start Chrome. Sign in
a profile, and choose "View all people" from the avatar bubble. With
the user manager window open, lock the profile. The user manager should
update the profile's pod with a lock icon.

Review URL: https://codereview.chromium.org/128553002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243658 0039d316-1c4b-4281-b951-d872f2087c98
parent f71dc369
......@@ -705,6 +705,11 @@ void ProfileInfoCache::SetProfileSigninRequiredAtIndex(size_t index,
info->SetBoolean(kSigninRequiredKey, value);
// This takes ownership of |info|.
SetInfoForProfileAtIndex(index, info.release());
base::FilePath profile_path = GetPathOfProfileAtIndex(index);
FOR_EACH_OBSERVER(ProfileInfoCacheObserver,
observer_list_,
OnProfileSigninRequiredChanged(profile_path));
}
void ProfileInfoCache::SetProfileIsEphemeralAtIndex(size_t index, bool value) {
......
......@@ -25,6 +25,8 @@ class ProfileInfoCacheObserver {
virtual void OnProfileNameChanged(const base::FilePath& profile_path,
const base::string16& old_profile_name) {}
virtual void OnProfileAvatarChanged(const base::FilePath& profile_path) {}
virtual void OnProfileSigninRequiredChanged(
const base::FilePath& profile_path) {}
protected:
ProfileInfoCacheObserver() {}
......
......@@ -142,12 +142,6 @@ class UserManagerScreenHandler::ProfileUpdateObserver
user_manager_handler_->SendUserList();
}
virtual void OnProfileWillBeRemoved(
const base::FilePath& profile_path) OVERRIDE {
// No-op. When the profile is actually removed, OnProfileWasRemoved
// will be called.
}
virtual void OnProfileNameChanged(
const base::FilePath& profile_path,
const base::string16& old_profile_name) OVERRIDE {
......@@ -159,6 +153,11 @@ class UserManagerScreenHandler::ProfileUpdateObserver
user_manager_handler_->SendUserList();
}
virtual void OnProfileSigninRequiredChanged(
const base::FilePath& profile_path) OVERRIDE {
user_manager_handler_->SendUserList();
}
ProfileManager* profile_manager_;
UserManagerScreenHandler* user_manager_handler_; // Weak; owns us.
......
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