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

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

Issue 1026853002: Integrate the notification database with the normal code path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-db-ConfirmShow
Patch Set: android part 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/persistent_notification_delegate.cc
diff --git a/chrome/browser/notifications/persistent_notification_delegate.cc b/chrome/browser/notifications/persistent_notification_delegate.cc
index 9ac9837ca4ff262d59334bfde5d8ce0ccc20657f..4dd80dca44d0d6c8e96e03282447c2fd8b460030 100644
--- a/chrome/browser/notifications/persistent_notification_delegate.cc
+++ b/chrome/browser/notifications/persistent_notification_delegate.cc
@@ -6,7 +6,7 @@
#include "base/bind.h"
#include "base/guid.h"
-#include "chrome/browser/notifications/platform_notification_service_impl.h"
+#include "content/public/browser/notification_event_dispatcher.h"
#include "content/public/common/persistent_notification_status.h"
namespace {
@@ -19,13 +19,11 @@ void OnEventDispatchComplete(content::PersistentNotificationStatus status) {}
PersistentNotificationDelegate::PersistentNotificationDelegate(
content::BrowserContext* browser_context,
- int64 service_worker_registration_id,
- const GURL& origin,
- const content::PlatformNotificationData& notification_data)
+ int64_t persistent_notification_id,
+ const GURL& origin)
: browser_context_(browser_context),
- service_worker_registration_id_(service_worker_registration_id),
+ persistent_notification_id_(persistent_notification_id),
origin_(origin),
- notification_data_(notification_data),
id_(base::GenerateGUID()) {}
PersistentNotificationDelegate::~PersistentNotificationDelegate() {}
@@ -35,13 +33,12 @@ void PersistentNotificationDelegate::Display() {}
void PersistentNotificationDelegate::Close(bool by_user) {}
void PersistentNotificationDelegate::Click() {
- PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick(
- browser_context_,
- service_worker_registration_id_,
- id_,
- origin_,
- notification_data_,
- base::Bind(&OnEventDispatchComplete));
+ content::NotificationEventDispatcher::GetInstance()
+ ->DispatchNotificationClickEvent(
+ browser_context_,
+ persistent_notification_id_,
+ origin_,
+ base::Bind(&OnEventDispatchComplete));
}
std::string PersistentNotificationDelegate::id() const {

Powered by Google App Engine
This is Rietveld 408576698