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

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

Issue 2603423002: cros: Fix user image change crash (Closed)
Patch Set: rebase Created 3 years, 12 months 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 | « chrome/browser/ui/webui/settings/profile_info_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/settings/profile_info_handler.cc
diff --git a/chrome/browser/ui/webui/settings/profile_info_handler.cc b/chrome/browser/ui/webui/settings/profile_info_handler.cc
index 60f91128272a4d01d4fc538b3374957207592771..4ce53d7c5d77f6fea4e555f9519bf2d89cf6eb7a 100644
--- a/chrome/browser/ui/webui/settings/profile_info_handler.cc
+++ b/chrome/browser/ui/webui/settings/profile_info_handler.cc
@@ -41,6 +41,9 @@ const char ProfileInfoHandler::kProfileStatsCountReadyEventName[] =
ProfileInfoHandler::ProfileInfoHandler(Profile* profile)
: profile_(profile),
+#if defined(OS_CHROMEOS)
+ user_manager_observer_(this),
+#endif
profile_observer_(this) {
#if defined(OS_CHROMEOS)
// Set up the chrome://userimage/ source.
@@ -79,7 +82,7 @@ void ProfileInfoHandler::OnJavascriptAllowed() {
base::Unretained(this)));
#if defined(OS_CHROMEOS)
- user_manager::UserManager::Get()->AddObserver(this);
+ user_manager_observer_.Add(user_manager::UserManager::Get());
#endif
}
@@ -90,7 +93,7 @@ void ProfileInfoHandler::OnJavascriptDisallowed() {
profile_pref_registrar_.RemoveAll();
#if defined(OS_CHROMEOS)
- user_manager::UserManager::Get()->RemoveObserver(this);
+ user_manager_observer_.Remove(user_manager::UserManager::Get());
#endif
}
« no previous file with comments | « chrome/browser/ui/webui/settings/profile_info_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698