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 c336784bdd137294cc9cd093d2269063c9dbb2ba..ea4a4571ce9dce5f207459e7d9f3914768c6253c 100644 |
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc |
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc |
@@ -191,7 +191,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) { |
if (!profile_) { |
// If no profile was passed, we take the currently active profile and use it |
// as the owner of the current desktop. |
@@ -1214,7 +1214,7 @@ void ChromeLauncherControllerImpl::ScheduleUpdateAppLaunchersFromPref() { |
base::ThreadTaskRunnerHandle::Get()->PostTask( |
FROM_HERE, |
base::Bind(&ChromeLauncherControllerImpl::UpdateAppLaunchersFromPref, |
- base::Unretained(this))); |
+ weak_ptr_factory_.GetWeakPtr())); |
} |
void ChromeLauncherControllerImpl::UpdateAppLaunchersFromPref() { |