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

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: Fix comment 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
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 440880b957d9a3d30d8f65c321d79fbea0e53921..2fa6fd427ff1047606413eeb3c353826360fc11a 100644
--- a/chrome/browser/permissions/permission_context_base.h
+++ b/chrome/browser/permissions/permission_context_base.h
@@ -56,6 +56,12 @@ class PermissionContextBase : public KeyedService {
const ContentSettingsType permission_type);
~PermissionContextBase() override;
+ // A field trial used to enable thw global API kill switch.
raymes 2015/10/13 01:30:18 nit: thw->the
kcarattini 2015/10/13 03:06:22 Done.
+ static const char kApiKillSwitchFieldStudy[];
+
+ // The field trial param to enable an API kill switch.
+ static const char kApiKillSwitchFieldParamEnabledValue[];
raymes 2015/10/13 01:30:18 nit: you've referred to the kill switch in two dif
kcarattini 2015/10/13 03:06:22 I made them both "global. I want to distinguish th
+
// 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.
@@ -79,6 +85,9 @@ class PermissionContextBase : public KeyedService {
virtual void CancelPermissionRequest(content::WebContents* web_contents,
const PermissionRequestID& id);
+ // Whether the kill switch has been enabled for this API.
+ virtual bool IsApiKillSwitchOn() const;
+
protected:
// Decide whether the permission should be granted.
// Calls PermissionDecided if permission can be decided non-interactively,

Powered by Google App Engine
This is Rietveld 408576698