Chromium Code Reviews| Index: extensions/common/extension_messages.h |
| diff --git a/extensions/common/extension_messages.h b/extensions/common/extension_messages.h |
| index e2a9c9172b0807f617548139fcf39486540a8ebb..95eda508e3984d5fab942a3e5235f8aa06f9b200 100644 |
| --- a/extensions/common/extension_messages.h |
| +++ b/extensions/common/extension_messages.h |
| @@ -272,6 +272,9 @@ struct ExtensionMsg_PermissionSetStruct { |
| extensions::ManifestPermissionSet manifest_permissions; |
| extensions::URLPatternSet explicit_hosts; |
| extensions::URLPatternSet scriptable_hosts; |
| + extensions::URLPatternSet runtime_blocked_hosts; |
| + extensions::URLPatternSet runtime_allowed_hosts; |
| + bool uses_default_policy_host_restrictions; |
| }; |
| struct ExtensionMsg_Loaded_Params { |
| @@ -300,6 +303,16 @@ struct ExtensionMsg_Loaded_Params { |
| ExtensionMsg_PermissionSetStruct withheld_permissions; |
| std::map<int, ExtensionMsg_PermissionSetStruct> tab_specific_permissions; |
| + // Contians URLPatternSets defining which URLs an extension may not interact |
| + // with by policy. This is mapped to shared memory to deal with large lists. |
| + extensions::URLPatternSet runtime_blocked_hosts; |
| + extensions::URLPatternSet runtime_allowed_hosts; |
| + |
| + // If the extension uses the default list of blocked / allowed URLs. If false, |
| + // then the 'hosts' struct in this struct must be populated with a valid |
| + // shared memory handle. |
|
Devlin
2017/01/26 22:47:40
outdated?
nrpeter
2017/02/03 19:32:24
Done.
|
| + bool is_default_runtime_blocked_allowed_hosts; |
| + |
| // We keep this separate so that it can be used in logging. |
| std::string id; |
| @@ -421,6 +434,15 @@ IPC_STRUCT_BEGIN(ExtensionMsg_UpdatePermissions_Params) |
| IPC_STRUCT_MEMBER(std::string, extension_id) |
| IPC_STRUCT_MEMBER(ExtensionMsg_PermissionSetStruct, active_permissions) |
| IPC_STRUCT_MEMBER(ExtensionMsg_PermissionSetStruct, withheld_permissions) |
| + IPC_STRUCT_MEMBER(extensions::URLPatternSet, runtime_blocked_hosts) |
| + IPC_STRUCT_MEMBER(extensions::URLPatternSet, runtime_allowed_hosts) |
| + IPC_STRUCT_MEMBER(bool, uses_default_policy_host_restrictions) |
| +IPC_STRUCT_END() |
| + |
| +// Parameters structure for ExtensionMsg_UpdateDefaultPolicyHostRestrictions. |
| +IPC_STRUCT_BEGIN(ExtensionMsg_UpdateDefaultPolicyHostRestrictions_Params) |
| + IPC_STRUCT_MEMBER(extensions::URLPatternSet, default_runtime_blocked_hosts) |
| + IPC_STRUCT_MEMBER(extensions::URLPatternSet, default_runtime_allowed_hosts) |
| IPC_STRUCT_END() |
| // Messages sent from the browser to the renderer: |
| @@ -521,6 +543,10 @@ IPC_MESSAGE_ROUTED1(ExtensionMsg_SetTabId, |
| IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdatePermissions, |
| ExtensionMsg_UpdatePermissions_Params) |
| +// Tell the renderer to update an extension's runtime_blocked_hosts set. |
| +IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdateDefaultPolicyHostRestrictions, |
| + ExtensionMsg_UpdateDefaultPolicyHostRestrictions_Params) |
| + |
| // Tell the render view about new tab-specific permissions for an extension. |
| IPC_MESSAGE_CONTROL5(ExtensionMsg_UpdateTabSpecificPermissions, |
| GURL /* url */, |