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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc

Issue 2281743002: arc: Add support of default and OEM apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased + nits Created 4 years, 4 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
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 5eaee8fdf60c61d4d1b4ce6f51700dfdd90f9dc0..f04551be022b5764891dd3c7827597d16858d3ca 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() {

Powered by Google App Engine
This is Rietveld 408576698