OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "sandbox/win/src/top_level_dispatcher.h" | 5 #include "sandbox/win/src/top_level_dispatcher.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 dispatcher = new NamedPipeDispatcher(policy_); | 40 dispatcher = new NamedPipeDispatcher(policy_); |
41 ipc_targets_[IPC_CREATENAMEDPIPEW_TAG] = dispatcher; | 41 ipc_targets_[IPC_CREATENAMEDPIPEW_TAG] = dispatcher; |
42 named_pipe_dispatcher_.reset(dispatcher); | 42 named_pipe_dispatcher_.reset(dispatcher); |
43 | 43 |
44 dispatcher = new ThreadProcessDispatcher(policy_); | 44 dispatcher = new ThreadProcessDispatcher(policy_); |
45 ipc_targets_[IPC_NTOPENTHREAD_TAG] = dispatcher; | 45 ipc_targets_[IPC_NTOPENTHREAD_TAG] = dispatcher; |
46 ipc_targets_[IPC_NTOPENPROCESS_TAG] = dispatcher; | 46 ipc_targets_[IPC_NTOPENPROCESS_TAG] = dispatcher; |
47 ipc_targets_[IPC_CREATEPROCESSW_TAG] = dispatcher; | 47 ipc_targets_[IPC_CREATEPROCESSW_TAG] = dispatcher; |
48 ipc_targets_[IPC_NTOPENPROCESSTOKEN_TAG] = dispatcher; | 48 ipc_targets_[IPC_NTOPENPROCESSTOKEN_TAG] = dispatcher; |
49 ipc_targets_[IPC_NTOPENPROCESSTOKENEX_TAG] = dispatcher; | 49 ipc_targets_[IPC_NTOPENPROCESSTOKENEX_TAG] = dispatcher; |
| 50 ipc_targets_[IPC_CREATETHREAD_TAG] = dispatcher; |
50 thread_process_dispatcher_.reset(dispatcher); | 51 thread_process_dispatcher_.reset(dispatcher); |
51 | 52 |
52 dispatcher = new SyncDispatcher(policy_); | 53 dispatcher = new SyncDispatcher(policy_); |
53 ipc_targets_[IPC_CREATEEVENT_TAG] = dispatcher; | 54 ipc_targets_[IPC_CREATEEVENT_TAG] = dispatcher; |
54 ipc_targets_[IPC_OPENEVENT_TAG] = dispatcher; | 55 ipc_targets_[IPC_OPENEVENT_TAG] = dispatcher; |
55 sync_dispatcher_.reset(dispatcher); | 56 sync_dispatcher_.reset(dispatcher); |
56 | 57 |
57 dispatcher = new RegistryDispatcher(policy_); | 58 dispatcher = new RegistryDispatcher(policy_); |
58 ipc_targets_[IPC_NTCREATEKEY_TAG] = dispatcher; | 59 ipc_targets_[IPC_NTCREATEKEY_TAG] = dispatcher; |
59 ipc_targets_[IPC_NTOPENKEY_TAG] = dispatcher; | 60 ipc_targets_[IPC_NTOPENKEY_TAG] = dispatcher; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 } | 138 } |
138 | 139 |
139 Dispatcher* TopLevelDispatcher::GetDispatcher(int ipc_tag) { | 140 Dispatcher* TopLevelDispatcher::GetDispatcher(int ipc_tag) { |
140 if (ipc_tag >= IPC_LAST_TAG || ipc_tag <= IPC_UNUSED_TAG) | 141 if (ipc_tag >= IPC_LAST_TAG || ipc_tag <= IPC_UNUSED_TAG) |
141 return NULL; | 142 return NULL; |
142 | 143 |
143 return ipc_targets_[ipc_tag]; | 144 return ipc_targets_[ipc_tag]; |
144 } | 145 } |
145 | 146 |
146 } // namespace sandbox | 147 } // namespace sandbox |
OLD | NEW |