Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2239)

Unified Diff: chrome/browser/extensions/app_notification_manager.cc

Issue 8382010: Some fixups for app notifications: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/app_notification_manager_sync_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | chrome/browser/extensions/app_notification_manager_sync_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698