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

Unified Diff: chrome/browser/ui/webui/settings/profile_info_handler.h

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
Index: chrome/browser/ui/webui/settings/profile_info_handler.h
diff --git a/chrome/browser/ui/webui/settings/profile_info_handler.h b/chrome/browser/ui/webui/settings/profile_info_handler.h
index 304e256d9af3e08dc364427ffc65c66843622982..798c684c029164078d473e2636a8ea1657c0b895 100644
--- a/chrome/browser/ui/webui/settings/profile_info_handler.h
+++ b/chrome/browser/ui/webui/settings/profile_info_handler.h
@@ -15,8 +15,7 @@
#include "components/prefs/pref_change_registrar.h"
#if defined(OS_CHROMEOS)
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
+#include "components/user_manager/user_manager.h"
#endif
class Profile;
@@ -25,7 +24,7 @@ namespace settings {
class ProfileInfoHandler : public SettingsPageUIHandler,
#if defined(OS_CHROMEOS)
- public content::NotificationObserver,
+ public user_manager::UserManager::Observer,
#endif
public ProfileAttributesStorage::Observer {
public:
@@ -41,10 +40,8 @@ class ProfileInfoHandler : public SettingsPageUIHandler,
void OnJavascriptDisallowed() override;
#if defined(OS_CHROMEOS)
- // content::NotificationObserver implementation.
- void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
+ // user_manager::UserManager::Observer implementation.
+ void OnUserImageChanged(const user_manager::User& user) override;
#endif
// ProfileAttributesStorage::Observer implementation.
@@ -83,11 +80,6 @@ class ProfileInfoHandler : public SettingsPageUIHandler,
// Used to listen for changes in the list of managed supervised users.
PrefChangeRegistrar profile_pref_registrar_;
-#if defined(OS_CHROMEOS)
- // Used to listen to ChromeOS user image changes.
- content::NotificationRegistrar registrar_;
-#endif
-
DISALLOW_COPY_AND_ASSIGN(ProfileInfoHandler);
};

Powered by Google App Engine
This is Rietveld 408576698