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

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

Issue 785993003: [Push] Register: require user-visible to be present in the manifest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test after mock behavior change that was recently introduced Created 6 years 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 2ae4e6cb3281b5a505e399814d5527a6cd7a5ebc..d85f5a1188b162b6f4a917a75694617e7dd481db 100644
--- a/chrome/browser/services/gcm/push_messaging_permission_context.h
+++ b/chrome/browser/services/gcm/push_messaging_permission_context.h
@@ -9,6 +9,7 @@
#include "components/content_settings/core/common/content_settings_types.h"
+class PermissionRequestID;
class Profile;
namespace gcm {
@@ -34,8 +35,23 @@ class PushMessagingPermissionContext : public PermissionContextBase {
const BrowserPermissionCallback& callback) override;
private:
+ FRIEND_TEST_ALL_PREFIXES(PushMessagingPermissionContextTest,
+ DecidePushPermission);
+
+ // Used to decide the permission for push, once the permission for
+ // Notification has been granted/denied.
+ void DecidePushPermission(const PermissionRequestID& id,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin,
+ const BrowserPermissionCallback& callback,
+ bool notifications_permission_granted);
+
Profile* profile_;
+ // Must be the last member, to ensure that it will be
+ // destroyed first, which will invalidate weak pointers
+ base::WeakPtrFactory<PushMessagingPermissionContext> weak_factory_ui_thread_;
+
DISALLOW_COPY_AND_ASSIGN(PushMessagingPermissionContext);
};

Powered by Google App Engine
This is Rietveld 408576698