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

Unified Diff: chrome/browser/notifications/platform_notification_service_impl.cc

Issue 1072043003: Clean up the NotificationUIManagerAndroid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-db-Integrate
Patch Set: Created 5 years, 8 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
Index: chrome/browser/notifications/platform_notification_service_impl.cc
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
index a68fd7a57bbb1fe0662424f69a697fda92d40b97..1da38676400b8992a7fba1ba244ccfccc8ecb546 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -45,6 +45,13 @@ using message_center::NotifierId;
namespace {
+// Persistent notifications fired through the delegate do not care about the
+// lifetime of the Service Worker responsible for executing the event.
+void OnEventDispatchComplete(content::PersistentNotificationStatus status) {
+ // TODO(peter): Record UMA statistics about the result status of running
+ // events for persistent Web Notifications.
+}
+
void CancelNotification(const std::string& id, ProfileID profile_id) {
PlatformNotificationServiceImpl::GetInstance()
->GetNotificationUIManager()->CancelById(id, profile_id);
@@ -66,16 +73,14 @@ PlatformNotificationServiceImpl::~PlatformNotificationServiceImpl() {}
void PlatformNotificationServiceImpl::OnPersistentNotificationClick(
content::BrowserContext* browser_context,
int64_t persistent_notification_id,
- const GURL& origin,
- const base::Callback<void(content::PersistentNotificationStatus)>&
- callback) const {
+ const GURL& origin) const {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
content::NotificationEventDispatcher::GetInstance()
->DispatchNotificationClickEvent(
browser_context,
persistent_notification_id,
origin,
- callback);
+ base::Bind(&OnEventDispatchComplete));
}
blink::WebNotificationPermission

Powered by Google App Engine
This is Rietveld 408576698