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

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: rebase 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
« no previous file with comments | « chrome/browser/notifications/platform_notification_service_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4828551434b1e657d49be6344d0da1b6c9fb675b..5ecadd35d85819896607b4f7578caab6185eaa34 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
« no previous file with comments | « chrome/browser/notifications/platform_notification_service_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698