Chromium Code Reviews| 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..7547ff3da644b01eafdfed776c3282cd65e0e798 100644 |
| --- a/chrome/browser/extensions/permissions_updater.h |
| +++ b/chrome/browser/extensions/permissions_updater.h |
| @@ -24,6 +24,15 @@ class PermissionSet; |
| // and notifies interested parties of the changes. |
| class PermissionsUpdater { |
| public: |
| + // Platform specific delegate. |
| + class Delegate { |
| + public: |
| + virtual ~Delegate() {} |
| + virtual void InitializePermissions( |
|
Andrew T Wilson (Slow)
2017/04/11 11:32:54
Document what exactly InitialPermissions is suppos
Ivan Šandrk
2017/04/11 13:37:27
Devlin gave me the suggestion to use InitializePer
Devlin
2017/04/11 15:03:38
I recommended InitializePermissions to keep symmet
|
| + const Extension* extension, |
| + std::unique_ptr<const PermissionSet>* granted_permissions) = 0; |
| + }; |
| + |
| enum InitFlag { |
| INIT_FLAG_NONE = 0, |
| INIT_FLAG_TRANSIENT = 1 << 0, |
| @@ -39,6 +48,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); |
|
Andrew T Wilson (Slow)
2017/04/11 11:32:54
I'm surprised to see this as a static function/sta
Ivan Šandrk
2017/04/11 13:37:27
PermissionsUpdater has a short lifetime - just a h
Devlin
2017/04/11 15:03:38
PermissionsUpdater is designed to be a (mostly) si
|
| + |
| // 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. |