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

Unified Diff: chrome/browser/extensions/permissions_updater.h

Issue 2794803003: PS - Remove Clipboard Read permission from extensions in Public Sessions (except for whitelisted on… (Closed)
Patch Set: Using a platform delegate Created 3 years, 8 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/extensions/permissions_updater.h
diff --git a/chrome/browser/extensions/permissions_updater.h b/chrome/browser/extensions/permissions_updater.h
index e31d52a45b0d00a6e0b902b2727139cf01e13605..d570ea57397aed51c5ebc2ebd5a1f553617987e4 100644
--- a/chrome/browser/extensions/permissions_updater.h
+++ b/chrome/browser/extensions/permissions_updater.h
@@ -24,6 +24,14 @@ class PermissionSet;
// and notifies interested parties of the changes.
class PermissionsUpdater {
public:
+ // Platform specific delegate.
+ class Delegate {
+ public:
+ virtual ~Delegate() {}
+ virtual void InitializePermissions(PermissionsUpdater* permissions_updater,
+ const Extension* extension) = 0;
+ };
+
enum InitFlag {
INIT_FLAG_NONE = 0,
INIT_FLAG_TRANSIENT = 1 << 0,
@@ -39,6 +47,9 @@ class PermissionsUpdater {
InitFlag init_flag);
~PermissionsUpdater();
+ // Used for platform specific logic as to not litter the code with #ifdefs.
+ static void SetPlatformDelegate(Delegate* delegate);
+
// Adds the set of |permissions| to the |extension|'s active permission set
// and sends the relevant messages and notifications. This method assumes the
// user has already been prompted, if necessary, for the extra permissions.

Powered by Google App Engine
This is Rietveld 408576698