| Index: chrome/browser/extensions/permissions_updater.h
|
| diff --git a/chrome/browser/extensions/permissions_updater.h b/chrome/browser/extensions/permissions_updater.h
|
| index bbd7200a77301270d9e4f18aef8f0b105913e61b..073dd10ff271c49f6018cc19df0952608596f09b 100644
|
| --- a/chrome/browser/extensions/permissions_updater.h
|
| +++ b/chrome/browser/extensions/permissions_updater.h
|
| @@ -9,12 +9,14 @@
|
|
|
| #include "base/memory/ref_counted.h"
|
|
|
| -class Profile;
|
| -
|
| namespace base {
|
| class DictionaryValue;
|
| }
|
|
|
| +namespace content {
|
| +class BrowserContext;
|
| +}
|
| +
|
| namespace extensions {
|
|
|
| class Extension;
|
| @@ -25,7 +27,7 @@ class PermissionSet;
|
| // and notifies interested parties of the changes.
|
| class PermissionsUpdater {
|
| public:
|
| - explicit PermissionsUpdater(Profile* profile);
|
| + explicit PermissionsUpdater(content::BrowserContext* browser_context);
|
| ~PermissionsUpdater();
|
|
|
| // Adds the set of |permissions| to the |extension|'s active permission set
|
| @@ -43,9 +45,10 @@ class PermissionsUpdater {
|
| // granted permission set.
|
| void GrantActivePermissions(const Extension* extension);
|
|
|
| - // Sets the |extension|'s active permissions to |permissions|.
|
| - void UpdateActivePermissions(const Extension* extension,
|
| - const PermissionSet* permissions);
|
| + // Initializes the |extension|'s active permission set to include only
|
| + // permissions currently requested by the extension and all the permissions
|
| + // required by the extension.
|
| + void InitializeActivePermissions(const Extension* extension);
|
|
|
| private:
|
| enum EventType {
|
| @@ -53,6 +56,11 @@ class PermissionsUpdater {
|
| REMOVED,
|
| };
|
|
|
| + // Sets the |extension|'s active permissions to |permissions| and records the
|
| + // change in the prefs.
|
| + void SetActivePermissions(const Extension* extension,
|
| + const PermissionSet* permisssions);
|
| +
|
| // Dispatches specified event to the extension.
|
| void DispatchEvent(const std::string& extension_id,
|
| const char* event_name,
|
| @@ -67,10 +75,8 @@ class PermissionsUpdater {
|
| const Extension* extension,
|
| const PermissionSet* changed);
|
|
|
| - // Gets the ExtensionPrefs for the associated profile.
|
| - ExtensionPrefs* GetExtensionPrefs();
|
| -
|
| - Profile* profile_;
|
| + // The associated BrowserContext.
|
| + content::BrowserContext* browser_context_;
|
| };
|
|
|
| } // namespace extensions
|
|
|