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

Unified Diff: chrome/browser/permissions/permission_manager.h

Issue 2579593002: Change MediaPermission not to use PermissionContext directly (Closed)
Patch Set: Just PM Created 4 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
« no previous file with comments | « chrome/browser/media/webrtc/media_permission.cc ('k') | chrome/browser/permissions/permission_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/permissions/permission_manager.h
diff --git a/chrome/browser/permissions/permission_manager.h b/chrome/browser/permissions/permission_manager.h
index bd90dcf2c4d76dc00eecdd0c435dcbf87793409e..bc7e0406f875793d7595f14bc956f43f5f0a0806 100644
--- a/chrome/browser/permissions/permission_manager.h
+++ b/chrome/browser/permissions/permission_manager.h
@@ -68,11 +68,13 @@ class PermissionManager : public KeyedService,
override;
void UnsubscribePermissionStatusChange(int subscription_id) override;
+ // TODO(raymes): Rather than exposing this, expose a denial reason from
+ // GetPermissionStatus so that callers can determine whether a permission is
+ // denied due to the kill switch.
+ bool IsPermissionKillSwitchOn(content::PermissionType permission);
+
private:
friend class GeolocationPermissionContextTests;
- // TODO(raymes): Refactor MediaPermission to not call GetPermissionContext.
- // See crbug.com/596786.
- friend class MediaPermission;
class PendingRequest;
using PendingRequestsMap = IDMap<std::unique_ptr<PendingRequest>>;
@@ -99,6 +101,10 @@ class PermissionManager : public KeyedService,
ContentSettingsType content_type,
std::string resource_identifier) override;
+ ContentSetting GetPermissionStatusInternal(content::PermissionType permission,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin);
+
Profile* profile_;
PendingRequestsMap pending_requests_;
SubscriptionsMap subscriptions_;
« no previous file with comments | « chrome/browser/media/webrtc/media_permission.cc ('k') | chrome/browser/permissions/permission_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698