| 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 70f3aeae3dab8f77e9c9b45e4c98a892d88619fb..bf1516d6734008eb53b6891b1a24997854185e84 100644
|
| --- a/chrome/browser/notifications/persistent_notification_delegate.cc
|
| +++ b/chrome/browser/notifications/persistent_notification_delegate.cc
|
| @@ -4,21 +4,16 @@
|
|
|
| #include "chrome/browser/notifications/persistent_notification_delegate.h"
|
|
|
| -#include "base/bind.h"
|
| -#include "base/guid.h"
|
| -#include "chrome/browser/notifications/notification_common.h"
|
| #include "chrome/browser/notifications/platform_notification_service_impl.h"
|
| -#include "content/public/common/persistent_notification_status.h"
|
|
|
| PersistentNotificationDelegate::PersistentNotificationDelegate(
|
| content::BrowserContext* browser_context,
|
| - int64_t persistent_notification_id,
|
| + const std::string& notification_id,
|
| const GURL& origin,
|
| int notification_settings_index)
|
| : browser_context_(browser_context),
|
| - persistent_notification_id_(persistent_notification_id),
|
| + notification_id_(notification_id),
|
| origin_(origin),
|
| - id_(base::GenerateGUID()),
|
| notification_settings_index_(notification_settings_index) {}
|
|
|
| PersistentNotificationDelegate::~PersistentNotificationDelegate() {}
|
| @@ -27,18 +22,12 @@ void PersistentNotificationDelegate::Display() {}
|
|
|
| void PersistentNotificationDelegate::Close(bool by_user) {
|
| PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClose(
|
| - browser_context_,
|
| - persistent_notification_id_,
|
| - origin_,
|
| - by_user);
|
| + browser_context_, notification_id_, origin_, by_user);
|
| }
|
|
|
| void PersistentNotificationDelegate::Click() {
|
| PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick(
|
| - browser_context_,
|
| - persistent_notification_id_,
|
| - origin_,
|
| - -1 /* action_index */);
|
| + browser_context_, notification_id_, origin_, -1 /* action_index */);
|
| }
|
|
|
| void PersistentNotificationDelegate::ButtonClick(int button_index) {
|
| @@ -49,15 +38,11 @@ void PersistentNotificationDelegate::ButtonClick(int button_index) {
|
| }
|
|
|
| PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick(
|
| - browser_context_,
|
| - persistent_notification_id_,
|
| - origin_,
|
| - button_index);
|
| + browser_context_, notification_id_, origin_, button_index);
|
| }
|
|
|
| void PersistentNotificationDelegate::SettingsClick() {
|
| NotificationCommon::OpenNotificationSettings(browser_context_);
|
| - return;
|
| }
|
|
|
| bool PersistentNotificationDelegate::ShouldDisplaySettingsButton() {
|
| @@ -65,5 +50,5 @@ bool PersistentNotificationDelegate::ShouldDisplaySettingsButton() {
|
| }
|
|
|
| std::string PersistentNotificationDelegate::id() const {
|
| - return id_;
|
| + return notification_id_;
|
| }
|
|
|