| Index: chrome/browser/extensions/extension_management_internal.h
|
| diff --git a/chrome/browser/extensions/extension_management_internal.h b/chrome/browser/extensions/extension_management_internal.h
|
| index 0b3eaffb3ab9f7523f77576c754a6157dfacf19a..944f710a3da9a4087e60823071eaeb649d24312b 100644
|
| --- a/chrome/browser/extensions/extension_management_internal.h
|
| +++ b/chrome/browser/extensions/extension_management_internal.h
|
| @@ -26,10 +26,22 @@ namespace internal {
|
| // extensions. Settings can be applied to an individual extension identified
|
| // by an ID, a group of extensions with specific |update_url| or all
|
| // extensions at once.
|
| +// The settings applied to all extensions are the default settings and can be
|
| +// overridden by per-extension or per-update-url settings.
|
| +// There are multiple fields in this class. Unspecified fields in per-extension
|
| +// and per-update-url settings will take value from default settings (or merge
|
| +// from that, see per-field comments below for details). Unspecified fields in
|
| +// default extensions will take the default fall back value instead.
|
| +// Since update URL is not directly associated to extension ID, per-extension
|
| +// and per-update-url settings might be enforced at the same time, see per-field
|
| +// comments below for details.
|
| struct IndividualSettings {
|
| enum ParsingScope {
|
| // Parses the default settings.
|
| SCOPE_DEFAULT = 0,
|
| + // Parses the settings for extensions with specified update URL in its
|
| + // manifest.
|
| + SCOPE_UPDATE_URL,
|
| // Parses the settings for an extension with specified extension ID.
|
| SCOPE_INDIVIDUAL,
|
| };
|
| @@ -39,12 +51,12 @@ struct IndividualSettings {
|
|
|
| void Reset();
|
|
|
| - // Parses the individual settings. |dict| is the a sub-dictionary in extension
|
| + // Parses the individual settings. |dict| is a sub-dictionary in extension
|
| // management preference and |scope| represents the applicable range of the
|
| // settings, a single extension, a group of extensions or default settings.
|
| // Note that in case of parsing errors, |this| will NOT be left untouched.
|
| - // This method is required to be called in order of ParsingScope, i.e. first
|
| - // SCOPE_DEFAULT, then SCOPE_INDIVIDUAL.
|
| + // This method is required to be called for SCOPE_DEFAULT first, then
|
| + // for SCOPE_INDIVIDUAL and SCOPE_UPDATE_URL.
|
| bool Parse(const base::DictionaryValue* dict, ParsingScope scope);
|
|
|
| // Extension installation mode. Setting this to INSTALLATION_FORCED or
|
| @@ -53,20 +65,25 @@ struct IndividualSettings {
|
| // be specified, containing the update URL for this extension.
|
| // Note that |update_url| will be ignored for INSTALLATION_ALLOWED and
|
| // INSTALLATION_BLOCKED installation mode.
|
| - // These settings will override the default settings, and unspecified
|
| - // settings will take value from default settings.
|
| + // This setting will override the default settings, and unspecified
|
| + // setting will take value from default settings.
|
| + // In case this setting is specified in both per-extensions and
|
| + // per-update-url settings, per-extension settings will override
|
| + // per-update-url settings.
|
| ExtensionManagement::InstallationMode installation_mode;
|
| std::string update_url;
|
|
|
| - // Permissions settings for extensions. These settings won't grant permissions
|
| - // to extensions automatically. Instead, these settings will provide a list of
|
| + // Permissions block list for extensions. This setting won't grant permissions
|
| + // to extensions automatically. Instead, this setting will provide a list of
|
| // blocked permissions for each extension. That is, if an extension requires a
|
| // permission which has been blacklisted, this extension will not be allowed
|
| // to load. And if it contains a blocked permission as optional requirement,
|
| // it will be allowed to load (of course, with permission granted from user if
|
| - // necessary), but conflicting permissions will be dropped. These settings
|
| - // will merge from the default settings, and unspecified settings will take
|
| - // value from default settings.
|
| + // necessary), but conflicting permissions will be dropped. This setting will
|
| + // merge from the default settings, and unspecified settings will take value
|
| + // from default settings.
|
| + // In case this setting is specified in both per-extensions and per-update-url
|
| + // settings, both settings will be enforced.
|
| APIPermissionSet blocked_permissions;
|
|
|
| private:
|
|
|