Index: content/browser/notifications/notification_message_filter.h |
diff --git a/content/browser/notifications/notification_message_filter.h b/content/browser/notifications/notification_message_filter.h |
index 8f400a681fb1601108dd52267d507e720e246a70..5a56241d669d02bc5c13c3e2fa46d82bc7339a70 100644 |
--- a/content/browser/notifications/notification_message_filter.h |
+++ b/content/browser/notifications/notification_message_filter.h |
@@ -96,15 +96,24 @@ class CONTENT_EXPORT NotificationMessageFilter : public BrowserMessageFilter { |
// cases where the renderer shouldn't send messages if it weren't the case. If |
// no permission has been granted, a bad message has been received and the |
// renderer should be killed accordingly. |
- bool VerifyNotificationPermissionGranted( |
- PlatformNotificationService* service, |
- const GURL& origin); |
+ bool VerifyNotificationPermissionGranted(const GURL& origin); |
+ |
+ // Sets the PlatformNotificationService instance to use for tests. The test is |
+ // expected to clean up after themselves and reset this variable. |
+ static void SetNotificationServiceForTests( |
+ PlatformNotificationService* service) { |
+ service_ = service; |
+ } |
+ |
+ PlatformNotificationService* service() const; |
int process_id_; |
scoped_refptr<PlatformNotificationContextImpl> notification_context_; |
ResourceContext* resource_context_; |
BrowserContext* browser_context_; |
+ static PlatformNotificationService* service_; |
+ |
// Map mapping notification ids to their associated close closures. |
std::map<int, base::Closure> close_closures_; |