Chromium Code Reviews| Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc |
| diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc |
| index 6a0cfd173b2c2ef47e5d794172b04aff1990213f..777e978eaa07af528591726280203c5f12f0e0c4 100644 |
| --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc |
| +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc |
| @@ -175,7 +175,10 @@ ChromeLauncherController::ChromeLauncherController(Profile* profile, |
| chrome::NOTIFICATION_EXTENSION_UNLOADED, |
| content::Source<Profile>(profile_)); |
| pref_change_registrar_.Init(profile_->GetPrefs()); |
| - pref_change_registrar_.Add(prefs::kPinnedLauncherApps, this); |
| + pref_change_registrar_.Add( |
| + prefs::kPinnedLauncherApps, |
| + base::Bind(&ChromeLauncherController::UpdateAppLaunchersFromPref, |
| + base::Unretained(this))); |
| } |
| ChromeLauncherController::~ChromeLauncherController() { |
| @@ -777,20 +780,6 @@ void ChromeLauncherController::Observe( |
| } |
| } |
| -void ChromeLauncherController::OnPreferenceChanged( |
| - PrefServiceBase* service, |
| - const std::string& pref_name) { |
| - if (pref_name == prefs::kPinnedLauncherApps) { |
| - UpdateAppLaunchersFromPref(); |
| - } else if (pref_name == prefs::kShelfAlignmentLocal) { |
| - SetShelfAlignmentFromPrefs(); |
|
Mattias Nissler (ping if slow)
2012/11/21 11:31:04
Hm, maybe the code is missing pref change notifica
Jói
2012/11/21 12:59:33
davemoore: Do you know? The code prior to this cha
sky
2012/11/29 01:49:02
See line 236 old.
|
| - } else if (pref_name == prefs::kShelfAutoHideBehaviorLocal) { |
| - SetShelfAutoHideBehaviorFromPrefs(); |
| - } else { |
| - NOTREACHED() << "Unexpected pref change for " << pref_name; |
| - } |
| -} |
| - |
| void ChromeLauncherController::OnShelfAlignmentChanged() { |
| const char* pref_value = NULL; |
| // TODO(oshima): Support multiple displays. |