diff options
author | sashab <sashab@chromium.org> | 2014-12-09 19:12:25 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-10 03:13:06 +0000 |
commit | 45d827a6ba247ef55275c52ade2dfddbaeb87a9f (patch) | |
tree | 499f75454d5f648c85ebe60e5586da1e5011fc7d /extensions/shell/common | |
parent | 6e7f615f49056439312aad3fcdd2284e2bd69647 (diff) | |
download | chromium_src-45d827a6ba247ef55275c52ade2dfddbaeb87a9f.zip chromium_src-45d827a6ba247ef55275c52ade2dfddbaeb87a9f.tar.gz chromium_src-45d827a6ba247ef55275c52ade2dfddbaeb87a9f.tar.bz2 |
Added CoalescedPermissionMessages to ManifestPermissions
Added a new type, CoalescedPermissionMessage, which represents a
permission message made up of 0 or more permissions. Also started a
refactor to move IDs out of APIPermission::ID and PermissionMessage::ID
and into their own common class.
Added a new method GetPermissions() to ManifestPermission, which allows
manifest permissions to specify their own custom permissions (and hence
custom messages) for apps with that permission. Updated all 5 subclasses
(automation, bluetooth, sockets, UI overrides hanlder and the mock
manifest).
Also added another FilterHostPermissions() method to ExtensionsClient
that can create CoalescedPermissionMessages.
BUG=398257
Review URL: https://codereview.chromium.org/750353003
Cr-Commit-Position: refs/heads/master@{#307630}
Diffstat (limited to 'extensions/shell/common')
-rw-r--r-- | extensions/shell/common/shell_extensions_client.cc | 7 | ||||
-rw-r--r-- | extensions/shell/common/shell_extensions_client.h | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/extensions/shell/common/shell_extensions_client.cc b/extensions/shell/common/shell_extensions_client.cc index a598ded..3f7bc48 100644 --- a/extensions/shell/common/shell_extensions_client.cc +++ b/extensions/shell/common/shell_extensions_client.cc @@ -147,6 +147,13 @@ void ShellExtensionsClient::FilterHostPermissions( NOTIMPLEMENTED(); } +void ShellExtensionsClient::FilterHostPermissions( + const URLPatternSet& hosts, + URLPatternSet* new_hosts, + PermissionIDSet* permissions) const { + NOTIMPLEMENTED(); +} + void ShellExtensionsClient::SetScriptingWhitelist( const ScriptingWhitelist& whitelist) { scripting_whitelist_ = whitelist; diff --git a/extensions/shell/common/shell_extensions_client.h b/extensions/shell/common/shell_extensions_client.h index cbb72e1..3e5e9bb 100644 --- a/extensions/shell/common/shell_extensions_client.h +++ b/extensions/shell/common/shell_extensions_client.h @@ -31,6 +31,9 @@ class ShellExtensionsClient : public ExtensionsClient { const URLPatternSet& hosts, URLPatternSet* new_hosts, std::set<PermissionMessage>* messages) const override; + void FilterHostPermissions(const URLPatternSet& hosts, + URLPatternSet* new_hosts, + PermissionIDSet* permissions) const override; void SetScriptingWhitelist(const ScriptingWhitelist& whitelist) override; const ScriptingWhitelist& GetScriptingWhitelist() const override; URLPatternSet GetPermittedChromeSchemeHosts( |