Index: chrome/browser/extensions/app_notification_manager.cc |
=================================================================== |
--- chrome/browser/extensions/app_notification_manager.cc (revision 106989) |
+++ 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( |
@@ -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 |