Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc |
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc |
index 942550aeec7543d1185095a19e5d498e1e1b0b92..a87b388cfb94ff1eabcb657f8e31c273c3225afe 100644 |
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc |
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc |
@@ -189,7 +189,7 @@ void ChromeLauncherControllerUserSwitchObserver::AddUser(Profile* profile) { |
ChromeLauncherControllerImpl::ChromeLauncherControllerImpl( |
Profile* profile, |
ash::ShelfModel* model) |
- : model_(model), profile_(profile) { |
+ : model_(model), profile_(profile), weak_ptr_factory_(this) { |
DCHECK(model_); |
if (!profile_) { |
// If no profile was passed, we take the currently active profile and use it |
@@ -1180,7 +1180,7 @@ void ChromeLauncherControllerImpl::ScheduleUpdateAppLaunchersFromPref() { |
base::ThreadTaskRunnerHandle::Get()->PostTask( |
FROM_HERE, |
base::Bind(&ChromeLauncherControllerImpl::UpdateAppLaunchersFromPref, |
- base::Unretained(this))); |
+ weak_ptr_factory_.GetWeakPtr())); |
} |
void ChromeLauncherControllerImpl::UpdateAppLaunchersFromPref() { |