Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: extensions/common/extension_messages.h

Issue 2833843004: Reland: Communicate ExtensionSettings policy to renderers (Closed)
Patch Set: Removed unused URLPatternSet parameters in ExtensionMsg_PermissionSetStruct which was causing MSAN … Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « extensions/common/extension.h ('k') | extensions/common/extension_messages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // IPC messages for extensions. 5 // IPC messages for extensions.
6 // Multiply-included message file, hence no include guard. 6 // Multiply-included message file, hence no include guard.
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 // The path the extension was loaded from. This is used in the renderer only 315 // The path the extension was loaded from. This is used in the renderer only
316 // to generate the extension ID for extensions that are loaded unpacked. 316 // to generate the extension ID for extensions that are loaded unpacked.
317 base::FilePath path; 317 base::FilePath path;
318 318
319 // The extension's active and withheld permissions. 319 // The extension's active and withheld permissions.
320 ExtensionMsg_PermissionSetStruct active_permissions; 320 ExtensionMsg_PermissionSetStruct active_permissions;
321 ExtensionMsg_PermissionSetStruct withheld_permissions; 321 ExtensionMsg_PermissionSetStruct withheld_permissions;
322 std::map<int, ExtensionMsg_PermissionSetStruct> tab_specific_permissions; 322 std::map<int, ExtensionMsg_PermissionSetStruct> tab_specific_permissions;
323 323
324 // Contains URLPatternSets defining which URLs an extension may not interact
325 // with by policy.
326 extensions::URLPatternSet policy_blocked_hosts;
327 extensions::URLPatternSet policy_allowed_hosts;
328
329 // If the extension uses the default list of blocked / allowed URLs.
330 bool uses_default_policy_blocked_allowed_hosts = true;
331
324 // We keep this separate so that it can be used in logging. 332 // We keep this separate so that it can be used in logging.
325 std::string id; 333 std::string id;
326 334
327 // Send creation flags so extension is initialized identically. 335 // Send creation flags so extension is initialized identically.
328 int creation_flags; 336 int creation_flags;
329 }; 337 };
330 338
331 struct ExtensionHostMsg_AutomationQuerySelector_Error { 339 struct ExtensionHostMsg_AutomationQuerySelector_Error {
332 enum Value { kNone, kNoMainFrame, kNoDocument, kNodeDestroyed }; 340 enum Value { kNone, kNoMainFrame, kNoDocument, kNodeDestroyed };
333 341
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 443
436 IPC_STRUCT_TRAITS_BEGIN(ExtensionHostMsg_AutomationQuerySelector_Error) 444 IPC_STRUCT_TRAITS_BEGIN(ExtensionHostMsg_AutomationQuerySelector_Error)
437 IPC_STRUCT_TRAITS_MEMBER(value) 445 IPC_STRUCT_TRAITS_MEMBER(value)
438 IPC_STRUCT_TRAITS_END() 446 IPC_STRUCT_TRAITS_END()
439 447
440 // Parameters structure for ExtensionMsg_UpdatePermissions. 448 // Parameters structure for ExtensionMsg_UpdatePermissions.
441 IPC_STRUCT_BEGIN(ExtensionMsg_UpdatePermissions_Params) 449 IPC_STRUCT_BEGIN(ExtensionMsg_UpdatePermissions_Params)
442 IPC_STRUCT_MEMBER(std::string, extension_id) 450 IPC_STRUCT_MEMBER(std::string, extension_id)
443 IPC_STRUCT_MEMBER(ExtensionMsg_PermissionSetStruct, active_permissions) 451 IPC_STRUCT_MEMBER(ExtensionMsg_PermissionSetStruct, active_permissions)
444 IPC_STRUCT_MEMBER(ExtensionMsg_PermissionSetStruct, withheld_permissions) 452 IPC_STRUCT_MEMBER(ExtensionMsg_PermissionSetStruct, withheld_permissions)
453 IPC_STRUCT_MEMBER(extensions::URLPatternSet, policy_blocked_hosts)
454 IPC_STRUCT_MEMBER(extensions::URLPatternSet, policy_allowed_hosts)
455 IPC_STRUCT_MEMBER(bool, uses_default_policy_host_restrictions)
456 IPC_STRUCT_END()
457
458 // Parameters structure for ExtensionMsg_UpdateDefaultPolicyHostRestrictions.
459 IPC_STRUCT_BEGIN(ExtensionMsg_UpdateDefaultPolicyHostRestrictions_Params)
460 IPC_STRUCT_MEMBER(extensions::URLPatternSet, default_policy_blocked_hosts)
461 IPC_STRUCT_MEMBER(extensions::URLPatternSet, default_policy_allowed_hosts)
445 IPC_STRUCT_END() 462 IPC_STRUCT_END()
446 463
447 // Messages sent from the browser to the renderer: 464 // Messages sent from the browser to the renderer:
448 465
449 // The browser sends this message in response to all extension api calls. The 466 // The browser sends this message in response to all extension api calls. The
450 // response data (if any) is one of the base::Value subclasses, wrapped as the 467 // response data (if any) is one of the base::Value subclasses, wrapped as the
451 // first element in a ListValue. 468 // first element in a ListValue.
452 IPC_MESSAGE_ROUTED4(ExtensionMsg_Response, 469 IPC_MESSAGE_ROUTED4(ExtensionMsg_Response,
453 int /* request_id */, 470 int /* request_id */,
454 bool /* success */, 471 bool /* success */,
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 int /* id of browser window */) 558 int /* id of browser window */)
542 559
543 // Tell the render view what its tab ID is. 560 // Tell the render view what its tab ID is.
544 IPC_MESSAGE_ROUTED1(ExtensionMsg_SetTabId, 561 IPC_MESSAGE_ROUTED1(ExtensionMsg_SetTabId,
545 int /* id of tab */) 562 int /* id of tab */)
546 563
547 // Tell the renderer to update an extension's permission set. 564 // Tell the renderer to update an extension's permission set.
548 IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdatePermissions, 565 IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdatePermissions,
549 ExtensionMsg_UpdatePermissions_Params) 566 ExtensionMsg_UpdatePermissions_Params)
550 567
568 // Tell the renderer to update an extension's policy_blocked_hosts set.
569 IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdateDefaultPolicyHostRestrictions,
570 ExtensionMsg_UpdateDefaultPolicyHostRestrictions_Params)
571
551 // Tell the render view about new tab-specific permissions for an extension. 572 // Tell the render view about new tab-specific permissions for an extension.
552 IPC_MESSAGE_CONTROL5(ExtensionMsg_UpdateTabSpecificPermissions, 573 IPC_MESSAGE_CONTROL5(ExtensionMsg_UpdateTabSpecificPermissions,
553 GURL /* url */, 574 GURL /* url */,
554 std::string /* extension_id */, 575 std::string /* extension_id */,
555 extensions::URLPatternSet /* hosts */, 576 extensions::URLPatternSet /* hosts */,
556 bool /* update origin whitelist */, 577 bool /* update origin whitelist */,
557 int /* tab_id */) 578 int /* tab_id */)
558 579
559 // Tell the render view to clear tab-specific permissions for some extensions. 580 // Tell the render view to clear tab-specific permissions for some extensions.
560 IPC_MESSAGE_CONTROL3(ExtensionMsg_ClearTabSpecificPermissions, 581 IPC_MESSAGE_CONTROL3(ExtensionMsg_ClearTabSpecificPermissions,
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 int64_t /* service_worker_version_id */, 935 int64_t /* service_worker_version_id */,
915 std::string /* request_uuid */) 936 std::string /* request_uuid */)
916 937
917 // Asks the browser to decrement the pending activity count for 938 // Asks the browser to decrement the pending activity count for
918 // the worker with version id |service_worker_version_id|. 939 // the worker with version id |service_worker_version_id|.
919 // |request_uuid| must match the GUID of a previous request, otherwise the 940 // |request_uuid| must match the GUID of a previous request, otherwise the
920 // browser process ignores the IPC. 941 // browser process ignores the IPC.
921 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DecrementServiceWorkerActivity, 942 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DecrementServiceWorkerActivity,
922 int64_t /* service_worker_version_id */, 943 int64_t /* service_worker_version_id */,
923 std::string /* request_uuid */) 944 std::string /* request_uuid */)
OLDNEW
« no previous file with comments | « extensions/common/extension.h ('k') | extensions/common/extension_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698