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

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: Add test 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..def8df079512cb22b1f43b285e17fa3e861b5818 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.
+ static const char kApiKillSwitchFieldStudy[];
+
+ // The field trial responsible for rolling out Plugin Power Saver to users.
mlamouri (slow - plz ping) 2015/10/12 10:51:10 is the comment correct?
kcarattini 2015/10/12 11:05:29 Nope. Changed
+ static const char kApiKillSwitchFieldParamEnabledValue[];
mlamouri (slow - plz ping) 2015/10/12 10:51:10 Could that be in the implementation in the anonymo
kcarattini 2015/10/12 11:05:29 Doesn't the namespace need to be named to use it i
+
// 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