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

Unified Diff: chrome/browser/notifications/notification_platform_bridge_mac.h

Issue 2105863002: Verify that the notification response contains sensible data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 4 years, 6 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/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..88c198be5984290146a0e98c660770e5f1c7800b 100644
--- a/chrome/browser/notifications/notification_platform_bridge_mac.h
+++ b/chrome/browser/notifications/notification_platform_bridge_mac.h
@@ -8,6 +8,7 @@
#include <set>
#include <string>
+#include "base/compiler_specific.h"
#include "base/mac/scoped_nsobject.h"
#include "base/macros.h"
#include "chrome/browser/notifications/notification_platform_bridge.h"
@@ -37,6 +38,10 @@ class NotificationPlatformBridgeMac : public NotificationPlatformBridge {
std::set<std::string>* notifications) const override;
bool SupportsNotificationCenter() const override;
+ // Validates contents of the |response| dictionary as received from the system
+ // when a notification gets activated.
+ static bool VerifyNotificationData(NSDictionary* response) WARN_UNUSED_RESULT;
+
private:
// Cocoa class that receives callbacks from the NSUserNotificationCenter.
base::scoped_nsobject<NotificationCenterDelegate> delegate_;

Powered by Google App Engine
This is Rietveld 408576698