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

Side by Side Diff: components/nacl/common/nacl_messages.h

Issue 572973002: NaCl: Simpler validation for main nexe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years 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 | « components/nacl/browser/nacl_process_host.cc ('k') | components/nacl/common/nacl_types.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // Defines messages between the browser and NaCl process. 5 // Defines messages between the browser and NaCl process.
6 6
7 // Multiply-included message file, no traditional include guard. 7 // Multiply-included message file, no traditional include guard.
8 #include "base/process/process.h" 8 #include "base/process/process.h"
9 #include "components/nacl/common/nacl_types.h" 9 #include "components/nacl/common/nacl_types.h"
10 #include "components/nacl/common/nacl_types_param_traits.h" 10 #include "components/nacl/common/nacl_types_param_traits.h"
11 #include "ipc/ipc_channel_handle.h" 11 #include "ipc/ipc_channel_handle.h"
12 #include "ipc/ipc_message_macros.h" 12 #include "ipc/ipc_message_macros.h"
13 #include "ipc/ipc_platform_file.h" 13 #include "ipc/ipc_platform_file.h"
14 14
15 #define IPC_MESSAGE_START NaClMsgStart 15 #define IPC_MESSAGE_START NaClMsgStart
16 16
17 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClStartParams) 17 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClStartParams)
18 IPC_STRUCT_TRAITS_MEMBER(nexe_file) 18 IPC_STRUCT_TRAITS_MEMBER(nexe_file)
19 IPC_STRUCT_TRAITS_MEMBER(nexe_token_lo) 19 IPC_STRUCT_TRAITS_MEMBER(nexe_file_path_metadata)
20 IPC_STRUCT_TRAITS_MEMBER(nexe_token_hi)
21 IPC_STRUCT_TRAITS_MEMBER(handles) 20 IPC_STRUCT_TRAITS_MEMBER(handles)
22 IPC_STRUCT_TRAITS_MEMBER(debug_stub_server_bound_socket) 21 IPC_STRUCT_TRAITS_MEMBER(debug_stub_server_bound_socket)
23 IPC_STRUCT_TRAITS_MEMBER(validation_cache_enabled) 22 IPC_STRUCT_TRAITS_MEMBER(validation_cache_enabled)
24 IPC_STRUCT_TRAITS_MEMBER(validation_cache_key) 23 IPC_STRUCT_TRAITS_MEMBER(validation_cache_key)
25 IPC_STRUCT_TRAITS_MEMBER(version) 24 IPC_STRUCT_TRAITS_MEMBER(version)
26 IPC_STRUCT_TRAITS_MEMBER(enable_debug_stub) 25 IPC_STRUCT_TRAITS_MEMBER(enable_debug_stub)
27 IPC_STRUCT_TRAITS_MEMBER(enable_ipc_proxy) 26 IPC_STRUCT_TRAITS_MEMBER(enable_ipc_proxy)
28 IPC_STRUCT_TRAITS_MEMBER(process_type) 27 IPC_STRUCT_TRAITS_MEMBER(process_type)
29 IPC_STRUCT_TRAITS_MEMBER(crash_info_shmem_handle) 28 IPC_STRUCT_TRAITS_MEMBER(crash_info_shmem_handle)
30 IPC_STRUCT_TRAITS_END() 29 IPC_STRUCT_TRAITS_END()
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 bool /* Can validation be skipped? */) 82 bool /* Can validation be skipped? */)
84 83
85 // Used by the NaCl process to add a validation signature to the validation 84 // Used by the NaCl process to add a validation signature to the validation
86 // database in the browser. 85 // database in the browser.
87 IPC_MESSAGE_CONTROL1(NaClProcessMsg_SetKnownToValidate, 86 IPC_MESSAGE_CONTROL1(NaClProcessMsg_SetKnownToValidate,
88 std::string /* A validation signature */) 87 std::string /* A validation signature */)
89 88
90 // Used by the NaCl process to acquire trusted information about a file directly 89 // Used by the NaCl process to acquire trusted information about a file directly
91 // from the browser, including the file's path as well as a fresh version of the 90 // from the browser, including the file's path as well as a fresh version of the
92 // file handle. 91 // file handle.
93 // TODO(teravest): Remove the synchronous version of this message once initial 92 IPC_MESSAGE_CONTROL2(NaClProcessMsg_ResolveFileToken,
94 // nexe validation caching stops using this.
95 IPC_SYNC_MESSAGE_CONTROL2_2(NaClProcessMsg_ResolveFileToken,
96 uint64, /* file_token_lo */
97 uint64, /* file_token_hi */
98 IPC::PlatformFileForTransit, /* fd */
99 base::FilePath /* Path opened to get fd */)
100
101 IPC_MESSAGE_CONTROL2(NaClProcessMsg_ResolveFileTokenAsync,
102 uint64, /* file_token_lo */ 93 uint64, /* file_token_lo */
103 uint64 /* file_token_hi */) 94 uint64 /* file_token_hi */)
104 IPC_MESSAGE_CONTROL4(NaClProcessMsg_ResolveFileTokenAsyncReply, 95 IPC_MESSAGE_CONTROL4(NaClProcessMsg_ResolveFileTokenReply,
105 uint64, /* file_token_lo */ 96 uint64, /* file_token_lo */
106 uint64, /* file_token_hi */ 97 uint64, /* file_token_hi */
107 IPC::PlatformFileForTransit, /* fd */ 98 IPC::PlatformFileForTransit, /* fd */
108 base::FilePath /* Path opened to get fd */) 99 base::FilePath /* Path opened to get fd */)
109 100
110 // Notify the browser process that the server side of the PPAPI channel was 101 // Notify the browser process that the server side of the PPAPI channel was
111 // created successfully. 102 // created successfully.
112 IPC_MESSAGE_CONTROL4(NaClProcessHostMsg_PpapiChannelsCreated, 103 IPC_MESSAGE_CONTROL4(NaClProcessHostMsg_PpapiChannelsCreated,
113 IPC::ChannelHandle, /* browser_channel_handle */ 104 IPC::ChannelHandle, /* browser_channel_handle */
114 IPC::ChannelHandle, /* ppapi_renderer_channel_handle */ 105 IPC::ChannelHandle, /* ppapi_renderer_channel_handle */
115 IPC::ChannelHandle, /* trusted_renderer_channel_handle */ 106 IPC::ChannelHandle, /* trusted_renderer_channel_handle */
116 IPC::ChannelHandle /* manifest_service_channel_handle */) 107 IPC::ChannelHandle /* manifest_service_channel_handle */)
OLDNEW
« no previous file with comments | « components/nacl/browser/nacl_process_host.cc ('k') | components/nacl/common/nacl_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698