| Index: chrome/browser/notifications/notification_platform_bridge_mac.h
|
| diff --git a/chrome/browser/notifications/notification_platform_bridge_mac.h b/chrome/browser/notifications/notification_platform_bridge_mac.h
|
| index ad261aaa79764597f596b48b1d6b0472d580f005..0296d433a779a7a628771e717af6f913d6c821f9 100644
|
| --- a/chrome/browser/notifications/notification_platform_bridge_mac.h
|
| +++ b/chrome/browser/notifications/notification_platform_bridge_mac.h
|
| @@ -10,10 +10,12 @@
|
|
|
| #include "base/mac/scoped_nsobject.h"
|
| #include "base/macros.h"
|
| +#include "chrome/browser/notifications/notification_operation_common.h"
|
| #include "chrome/browser/notifications/notification_platform_bridge.h"
|
|
|
| class Notification;
|
| @class NotificationCenterDelegate;
|
| +@class NSDictionary;
|
| @class NSUserNotificationCenter;
|
| class PrefService;
|
|
|
| @@ -26,10 +28,12 @@ class NotificationPlatformBridgeMac : public NotificationPlatformBridge {
|
| ~NotificationPlatformBridgeMac() override;
|
|
|
| // NotificationPlatformBridge implementation.
|
| - void Display(const std::string& notification_id,
|
| - const std::string& profile_id,
|
| - bool incognito,
|
| - const Notification& notification) override;
|
| + void Display(
|
| + notification_operation_common::NotificationHandlerType notification_type,
|
| + const std::string& notification_id,
|
| + const std::string& profile_id,
|
| + bool incognito,
|
| + const Notification& notification) override;
|
| void Close(const std::string& profile_id,
|
| const std::string& notification_id) override;
|
| bool GetDisplayed(const std::string& profile_id,
|
| @@ -37,6 +41,12 @@ class NotificationPlatformBridgeMac : public NotificationPlatformBridge {
|
| std::set<std::string>* notifications) const override;
|
| bool SupportsNotificationCenter() const override;
|
|
|
| + // Perform some sanity checks on the returned values. Since the notification
|
| + // data comes from outside of Chrome it's better to do real production checks
|
| + // than just DCHECKS.
|
| + // Returns true if all the checks pass, false otherwise.
|
| + static bool VerifyNotificationData(NSDictionary* response);
|
| +
|
| private:
|
| // Cocoa class that receives callbacks from the NSUserNotificationCenter.
|
| base::scoped_nsobject<NotificationCenterDelegate> delegate_;
|
|
|