diff options
author | sashab <sashab@chromium.org> | 2014-12-10 02:54:48 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-10 10:55:09 +0000 |
commit | 7c08b85486f7bd6af38190138e522d5c278a95ba (patch) | |
tree | 7022c9cb520e608284174d6348b74f6a04fe3c03 /extensions/shell/common | |
parent | 9c71effb6c20c1b53c620386a7e7d2979a8bf6c6 (diff) | |
download | chromium_src-7c08b85486f7bd6af38190138e522d5c278a95ba.zip chromium_src-7c08b85486f7bd6af38190138e522d5c278a95ba.tar.gz chromium_src-7c08b85486f7bd6af38190138e522d5c278a95ba.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
Committed: https://crrev.com/45d827a6ba247ef55275c52ade2dfddbaeb87a9f
Cr-Commit-Position: refs/heads/master@{#307630}
Review URL: https://codereview.chromium.org/750353003
Cr-Commit-Position: refs/heads/master@{#307677}
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( |