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 0355ee7e2ad6279726f037212487ea77ff267862..dfe024dac30dee7320c5d83a5e9e9645a53fc0b9 100644 |
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc |
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc |
@@ -441,7 +441,8 @@ void AppLauncherHandler::HandleGetApps(const ListValue* args) { |
// b) Conceptually, it doesn't really make sense to count a |
// prefchange-triggered refresh as a promo 'view'. |
AppsPromo* apps_promo = extension_service_->apps_promo(); |
- PrefService* prefs = Profile::FromWebUI(web_ui_)->GetPrefs(); |
+ Profile* profile = Profile::FromWebUI(web_ui_); |
+ PrefService* prefs = profile->GetPrefs(); |
bool apps_promo_just_expired = false; |
if (apps_promo->ShouldShowPromo(extension_service_->GetAppIds(), |
&apps_promo_just_expired)) { |
@@ -470,17 +471,17 @@ void AppLauncherHandler::HandleGetApps(const ListValue* args) { |
// the apps as they change. |
if (registrar_.IsEmpty()) { |
registrar_.Add(this, chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED, |
Yoyo Zhou
2011/08/29 22:40:46
This looks like it could possibly be sent from an
jstritar
2011/08/30 15:06:31
Done.
|
- NotificationService::AllSources()); |
+ Source<Profile>(profile)); |
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, |
- NotificationService::AllSources()); |
+ Source<Profile>(profile)); |
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, |
- NotificationService::AllSources()); |
+ Source<Profile>(profile)); |
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LAUNCHER_REORDERED, |
- NotificationService::AllSources()); |
+ Source<ExtensionPrefs>(extension_service_->extension_prefs())); |
registrar_.Add(this, chrome::NOTIFICATION_WEB_STORE_PROMO_LOADED, |
- NotificationService::AllSources()); |
+ Source<Profile>(profile)); |
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR, |
- NotificationService::AllSources()); |
+ Source<Profile>(profile)); |
} |
if (pref_change_registrar_.IsEmpty()) { |
pref_change_registrar_.Init( |