Index: chrome/browser/ui/webui/ntp/app_launcher_handler.cc |
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc |
index 701a5e2370d616d50240e84549e8a6415819e28b..d701b2042775125e754eda12e3735e12bcbb7695 100644 |
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc |
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc |
@@ -312,13 +312,6 @@ void AppLauncherHandler::Observe(int type, |
// TODO(estade): Try to get rid of this inefficient operation. |
HandleGetApps(NULL); |
break; |
- case chrome::NOTIFICATION_PREF_CHANGED: { |
- DictionaryValue dictionary; |
- FillAppDictionary(&dictionary); |
- web_ui()->CallJavascriptFunction("ntp.appsPrefChangeCallback", |
- dictionary); |
- break; |
- } |
case chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR: { |
CrxInstaller* crx_installer = content::Source<CrxInstaller>(source).ptr(); |
if (!Profile::FromWebUI(web_ui())->IsSameProfile( |
@@ -336,6 +329,14 @@ void AppLauncherHandler::Observe(int type, |
} |
} |
+void AppLauncherHandler::OnPreferenceChanged(PrefServiceBase* service, |
+ const std::string& pref_name) { |
+ DictionaryValue dictionary; |
+ FillAppDictionary(&dictionary); |
+ web_ui()->CallJavascriptFunction("ntp.appsPrefChangeCallback", |
+ dictionary); |
+} |
+ |
void AppLauncherHandler::FillAppDictionary(DictionaryValue* dictionary) { |
// CreateAppInfo and ClearOrdinals can change the extension prefs. |
AutoReset<bool> auto_reset(&ignore_changes_, true); |