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

Unified Diff: components/user_manager/user_manager_base.cc

Issue 2568973002: chromeos: Replace user image notifications with observer (Closed)
Patch Set: rebase Created 4 years 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 | « components/user_manager/user_manager_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_manager/user_manager_base.cc
diff --git a/components/user_manager/user_manager_base.cc b/components/user_manager/user_manager_base.cc
index 2c7b3ffddaff6b26cf2afabb450f9794db72702e..cc094666da12964877cc33830038c7ff38980c46 100644
--- a/components/user_manager/user_manager_base.cc
+++ b/components/user_manager/user_manager_base.cc
@@ -669,6 +669,26 @@ void UserManagerBase::NotifyLocalStateChanged() {
observer.LocalStateChanged(this);
}
+void UserManagerBase::NotifyUserImageChanged(const User& user) {
+ DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ for (auto& observer : observer_list_)
+ observer.OnUserImageChanged(user);
+}
+
+void UserManagerBase::NotifyUserProfileImageUpdateFailed(const User& user) {
+ DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ for (auto& observer : observer_list_)
+ observer.OnUserProfileImageUpdateFailed(user);
+}
+
+void UserManagerBase::NotifyUserProfileImageUpdated(
+ const User& user,
+ const gfx::ImageSkia& profile_image) {
+ DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ for (auto& observer : observer_list_)
+ observer.OnUserProfileImageUpdated(user, profile_image);
+}
+
bool UserManagerBase::CanUserBeRemoved(const User* user) const {
// Only regular and supervised users are allowed to be manually removed.
if (!user || !(user->HasGaiaAccount() || user->IsSupervised()))
« no previous file with comments | « components/user_manager/user_manager_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698