Communicate ExtensionSettings policy to renderers

Desktop / Chromium - nrpeter [google.com] - 17 April 2017 14:25 EDT

-Communicate which hosts are runtime blocked to all renderers-Blocks host permissions for specific hosts by specific extensions-Tests via blocking content script injection-Introduces new test class for use with ExtensionSettings policy

BUG=624649

Review-Url: https://codereview.chromium.org/2499493004 Cr-Commit-Position: refs/heads/master@{#464954}

c2f02148 Communicate ExtensionSettings policy to renderers
.../api/permissions/permissions_apitest.cc | 16 +-
.../browser/extensions/content_script_apitest.cc | 14 ++
chrome/browser/extensions/extension_management.cc | 19 +-
chrome/browser/extensions/extension_management.h | 22 +-
.../extensions/extension_management_constants.cc | 1 +
.../extensions/extension_management_constants.h | 1 +
.../extensions/extension_management_internal.cc | 11 +-
chrome/browser/extensions/extension_service.cc | 15 ++
.../extension_with_management_policy_apitest.cc | 21 ++
.../extension_with_management_policy_apitest.h | 29 +++
chrome/browser/extensions/permissions_updater.cc | 88 +++++++-
chrome/browser/extensions/permissions_updater.h | 25 +++
.../extensions/permissions_updater_unittest.cc | 107 ++++++++++
.../permissions/permissions_data_unittest.cc | 223 ++++++++++++++++++---
chrome/test/BUILD.gn | 2 +
.../api_test/content_scripts/policy/background.js | 53 +++++
.../api_test/content_scripts/policy/manifest.json | 7 +
extensions/browser/renderer_startup_helper.cc | 10 +
extensions/common/constants.cc | 4 +
extensions/common/constants.h | 3 +
extensions/common/extension.h | 1 +
extensions/common/extension_messages.cc | 38 +++-
extensions/common/extension_messages.h | 24 +++
extensions/common/permissions/permissions_data.cc | 93 ++++++++-
extensions/common/permissions/permissions_data.h | 81 ++++++++
extensions/common/url_pattern.cc | 41 +++-
extensions/common/url_pattern.h | 25 ++-
extensions/common/url_pattern_unittest.cc | 114 ++++++++---
extensions/renderer/dispatcher.cc | 24 ++-
extensions/renderer/dispatcher.h | 3 +
30 files changed, 1014 insertions(+), 101 deletions(-)

Upstream: git.chromium.org


  • Share