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

Unified Diff: content/browser/notifications/notification_message_filter.h

Issue 1050623003: Move the Notification browser tests down to //content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-db-Integrate
Patch Set: Created 5 years, 9 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: 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_;

Powered by Google App Engine
This is Rietveld 408576698