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

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

Issue 1388343003: Adds a field trial to control Web API kill switches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/permissions/permission_context_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6c084e179c48da4dae0045acb35b18fed494336c..2db397c744dc195b1ea8a22abd7bcd2607186184 100644
--- a/chrome/browser/permissions/permission_context_base.h
+++ b/chrome/browser/permissions/permission_context_base.h
@@ -58,6 +58,14 @@ class PermissionContextBase : public KeyedService {
const ContentSettingsType permission_type);
~PermissionContextBase() override;
+ // A field trial used to enable the global permissions kill switch.
+ // This is public for testing purposes.
+ static const char kPermissionsKillSwitchFieldStudy[];
+
+ // The field trial param to enable the global permissions kill switch.
+ // This is public for testing purposes.
+ static const char kPermissionsKillSwitchBlockedValue[];
+
// The renderer is requesting permission to push messages.
// When the answer to a permission request has been determined, |callback|
// should be called with the result.
@@ -81,6 +89,11 @@ class PermissionContextBase : public KeyedService {
virtual void CancelPermissionRequest(content::WebContents* web_contents,
const PermissionRequestID& id);
+ // Whether the kill switch has been enabled for this permission.
+ // public for permissions that do not use RequestPermission, like
+ // camera and microphone, and for testing.
+ bool IsPermissionKillSwitchOn() const;
+
protected:
// Decide whether the permission should be granted.
// Calls PermissionDecided if permission can be decided non-interactively,
« no previous file with comments | « no previous file | chrome/browser/permissions/permission_context_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698