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

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

Issue 1575623002: Disable Web Notifications in Incognito (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permfix
Patch Set: Address nit. Created 4 years, 11 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_permission_context.h
diff --git a/chrome/browser/notifications/notification_permission_context.h b/chrome/browser/notifications/notification_permission_context.h
index fb30d228842e4790f4ff28fdf46453971433b6d8..2ca67cf9088cd67f05e29355e46d47ddff8d891f 100644
--- a/chrome/browser/notifications/notification_permission_context.h
+++ b/chrome/browser/notifications/notification_permission_context.h
@@ -28,10 +28,20 @@ class NotificationPermissionContext : public PermissionContextBase {
NoSecureOriginRequirement);
// PermissionContextBase implementation.
+ void DecidePermission(content::WebContents* web_contents,
+ const PermissionRequestID& id,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin,
+ bool user_gesture,
+ const BrowserPermissionCallback& callback) override;
void UpdateContentSetting(const GURL& requesting_origin,
const GURL& embedder_origin,
ContentSetting content_setting) override;
bool IsRestrictedToSecureOrigins() const override;
+
+ // Must be the last member, to ensure that it will be
+ // destroyed first, which will invalidate weak pointers
Peter Beverloo 2016/01/13 01:42:10 No need for this documentation, it's always the ca
johnme 2016/01/13 20:49:26 Done (cool, didn't know about the clang plugin).
+ base::WeakPtrFactory<NotificationPermissionContext> weak_factory_ui_thread_;
};
#endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_H_

Powered by Google App Engine
This is Rietveld 408576698