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

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

Issue 2898663002: Implement feature policy checks in the browser process (Closed)
Patch Set: Implement feature policy checks in the browser process Created 3 years, 7 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/permissions/permission_context_base.h
diff --git a/chrome/browser/permissions/permission_context_base.h b/chrome/browser/permissions/permission_context_base.h
index 72ef40eee34a40502376ba08970940774901d7b8..e50a900b1bed6053e7ba723a282c3ad010cdfb8c 100644
--- a/chrome/browser/permissions/permission_context_base.h
+++ b/chrome/browser/permissions/permission_context_base.h
@@ -16,6 +16,7 @@
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/keyed_service/core/keyed_service.h"
+#include "third_party/WebKit/public/platform/WebFeaturePolicyFeature.h"
#if defined(OS_ANDROID)
class PermissionQueueController;
@@ -58,7 +59,8 @@ using BrowserPermissionCallback = base::Callback<void(ContentSetting)>;
class PermissionContextBase : public KeyedService {
public:
PermissionContextBase(Profile* profile,
- const ContentSettingsType content_settings_type);
+ ContentSettingsType content_settings_type,
+ blink::WebFeaturePolicyFeature feature_policy_feature);
~PermissionContextBase() override;
// A field trial used to enable the global permissions kill switch.
@@ -180,6 +182,8 @@ class PermissionContextBase : public KeyedService {
private:
friend class PermissionContextBaseTests;
+ bool PermissionAllowedByFeaturePolicy(content::RenderFrameHost* rfh) const;
+
// Called when a request is no longer used so it can be cleaned up.
void CleanUpRequest(const PermissionRequestID& id);
@@ -204,6 +208,7 @@ class PermissionContextBase : public KeyedService {
Profile* profile_;
const ContentSettingsType content_settings_type_;
+ const blink::WebFeaturePolicyFeature feature_policy_feature_;
#if defined(OS_ANDROID)
std::unique_ptr<PermissionQueueController> permission_queue_controller_;
#endif
« no previous file with comments | « chrome/browser/notifications/notification_permission_context.cc ('k') | chrome/browser/permissions/permission_context_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698