Chromium Code Reviews| Index: chrome/browser/extensions/app_notification_manager.cc |
| =================================================================== |
| --- chrome/browser/extensions/app_notification_manager.cc (revision 106777) |
| +++ chrome/browser/extensions/app_notification_manager.cc (working copy) |
| @@ -110,6 +110,12 @@ |
| base::Bind(&AppNotificationManager::SaveOnFileThread, |
| this, extension_id, CopyAppNotificationList(list))); |
| } |
| + |
| + content::NotificationService::current()->Notify( |
| + chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED, |
| + content::Source<Profile>(profile_), |
| + content::Details<const std::string>(&extension_id)); |
| + |
| return true; |
| } |
| @@ -141,6 +147,8 @@ |
| if (found == notifications_->end()) |
| return NULL; |
| const AppNotificationList& list = found->second; |
| + if (list.empty()) |
| + return NULL; |
| return list.rbegin()->get(); |
| } |
| @@ -160,6 +168,11 @@ |
| base::Bind(&AppNotificationManager::DeleteOnFileThread, |
| this, extension_id)); |
| } |
| + |
| + content::NotificationService::current()->Notify( |
| + chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED, |
| + content::Source<Profile>(profile_), |
| + content::Details<const std::string>(&extension_id)); |
| } |
| void AppNotificationManager::Observe( |
| @@ -209,7 +222,7 @@ |
| if (i->second.empty()) |
| continue; |
| content::NotificationService::current()->Notify( |
| - chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED, |
| + chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED, |
|
asargent_no_longer_on_chrome
2011/10/24 22:09:15
nit: this should be indented like the next 2 lines
Munjal (Google)
2011/10/24 22:22:55
Done.
|
| content::Source<Profile>(profile_), |
| content::Details<const std::string>(&id)); |
| } |
| @@ -439,6 +452,11 @@ |
| base::Bind(&AppNotificationManager::SaveOnFileThread, |
| this, extension_id, CopyAppNotificationList(list))); |
| } |
| + |
| + content::NotificationService::current()->Notify( |
| + chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED, |
| + content::Source<Profile>(profile_), |
| + content::Details<const std::string>(&extension_id)); |
| } |
| // static |