| 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 48bfbed68c44ac7f0ba73766821c01785ed372a2..cd7151484ffe2892d7a04d3204c2dbe0d86353bc 100644
|
| --- a/chrome/browser/ui/webui/settings/profile_info_handler.cc
|
| +++ b/chrome/browser/ui/webui/settings/profile_info_handler.cc
|
| @@ -44,7 +44,8 @@ ProfileInfoHandler::ProfileInfoHandler(Profile* profile)
|
| #if defined(OS_CHROMEOS)
|
| user_manager_observer_(this),
|
| #endif
|
| - profile_observer_(this) {
|
| + profile_observer_(this),
|
| + weak_ptr_factory_(this) {
|
| #if defined(OS_CHROMEOS)
|
| // Set up the chrome://userimage/ source.
|
| content::URLDataSource::Add(profile,
|
| @@ -133,7 +134,7 @@ void ProfileInfoHandler::HandleGetProfileStats(const base::ListValue* args) {
|
| // (e.g., |item.success| is false). Therefore, query the actual statistics.
|
| ProfileStatisticsFactory::GetForProfile(profile_)->GatherStatistics(
|
| base::Bind(&ProfileInfoHandler::PushProfileStatsCount,
|
| - base::Unretained(this)));
|
| + weak_ptr_factory_.GetWeakPtr()));
|
| }
|
|
|
| void ProfileInfoHandler::PushProfileStatsCount(
|
|
|