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

Unified Diff: chrome/browser/services/gcm/push_messaging_permission_context.h

Issue 718203004: [PUSH] Merge notifications and push messaging prompts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/services/gcm/push_messaging_permission_context.h
diff --git a/chrome/browser/services/gcm/push_messaging_permission_context.h b/chrome/browser/services/gcm/push_messaging_permission_context.h
index 819f41e0df2643994de542e1a38e6390bcfa0bea..d3f4daa4d66294b47f109c56974b989ed72c9386 100644
--- a/chrome/browser/services/gcm/push_messaging_permission_context.h
+++ b/chrome/browser/services/gcm/push_messaging_permission_context.h
@@ -7,6 +7,10 @@
#include "chrome/browser/content_settings/permission_context_base.h"
+#include "components/content_settings/core/common/content_settings_types.h"
+
+class Profile;
+
namespace gcm {
// Permission context for push messages.
@@ -15,7 +19,22 @@ class PushMessagingPermissionContext : public PermissionContextBase {
explicit PushMessagingPermissionContext(Profile* profile);
~PushMessagingPermissionContext() override;
+ ContentSetting GetPermissionStatus(
johnme 2014/11/13 18:50:06 Nit: Could you add a "// PermissionContextBase imp
Miguel Garcia 2014/11/14 11:34:36 Done.
+ const GURL& requesting_origin,
+ const GURL& embedding_origin) const override;
+
+ protected:
+ void DecidePermission(content::WebContents* web_contents,
+ const PermissionRequestID& id,
+ const GURL& requesting_origin,
+ const GURL& embedder_origin,
+ bool user_gesture,
+ const BrowserPermissionCallback& callback) override;
+
private:
+ Profile* push_profile_;
Michael van Ouwerkerk 2014/11/13 18:35:52 PermissionContextBase already has this pointer. Wh
Miguel Garcia 2014/11/14 11:34:36 I don't think subclasses should this need in gener
+ ContentSettingsType push_setting_type_;
Michael van Ouwerkerk 2014/11/13 18:35:52 Why is this a member? It is always set to CONTENT_
Miguel Garcia 2014/11/14 11:34:36 Well, because if we ever change CONTENT_SETTINGS_T
Bernhard Bauer 2014/11/14 12:31:33 Couldn't you make it a constant declared in the .c
Miguel Garcia 2014/11/17 11:43:22 Done.
+
DISALLOW_COPY_AND_ASSIGN(PushMessagingPermissionContext);
};

Powered by Google App Engine
This is Rietveld 408576698