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

Side by Side Diff: sandbox/win/src/top_level_dispatcher.cc

Issue 1856993003: Implement sandbox hooks to forward OPM related GDI system calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed header Created 4 years, 7 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 | « sandbox/win/src/sandbox_policy_base.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 dispatcher = new RegistryDispatcher(policy_); 56 dispatcher = new RegistryDispatcher(policy_);
57 ipc_targets_[IPC_NTCREATEKEY_TAG] = dispatcher; 57 ipc_targets_[IPC_NTCREATEKEY_TAG] = dispatcher;
58 ipc_targets_[IPC_NTOPENKEY_TAG] = dispatcher; 58 ipc_targets_[IPC_NTOPENKEY_TAG] = dispatcher;
59 registry_dispatcher_.reset(dispatcher); 59 registry_dispatcher_.reset(dispatcher);
60 60
61 dispatcher = new ProcessMitigationsWin32KDispatcher(policy_); 61 dispatcher = new ProcessMitigationsWin32KDispatcher(policy_);
62 ipc_targets_[IPC_GDI_GDIDLLINITIALIZE_TAG] = dispatcher; 62 ipc_targets_[IPC_GDI_GDIDLLINITIALIZE_TAG] = dispatcher;
63 ipc_targets_[IPC_GDI_GETSTOCKOBJECT_TAG] = dispatcher; 63 ipc_targets_[IPC_GDI_GETSTOCKOBJECT_TAG] = dispatcher;
64 ipc_targets_[IPC_USER_REGISTERCLASSW_TAG] = dispatcher; 64 ipc_targets_[IPC_USER_REGISTERCLASSW_TAG] = dispatcher;
65 ipc_targets_[IPC_USER_ENUMDISPLAYMONITORS_TAG] = dispatcher;
66 ipc_targets_[IPC_USER_ENUMDISPLAYDEVICES_TAG] = dispatcher;
67 ipc_targets_[IPC_USER_GETMONITORINFO_TAG] = dispatcher;
68 ipc_targets_[IPC_GDI_CREATEOPMPROTECTEDOUTPUTS_TAG] = dispatcher;
69 ipc_targets_[IPC_GDI_GETCERTIFICATE_TAG] = dispatcher;
70 ipc_targets_[IPC_GDI_GETCERTIFICATESIZE_TAG] = dispatcher;
71 ipc_targets_[IPC_GDI_DESTROYOPMPROTECTEDOUTPUT_TAG] = dispatcher;
72 ipc_targets_[IPC_GDI_CONFIGUREOPMPROTECTEDOUTPUT_TAG] = dispatcher;
73 ipc_targets_[IPC_GDI_GETOPMINFORMATION_TAG] = dispatcher;
74 ipc_targets_[IPC_GDI_GETOPMRANDOMNUMBER_TAG] = dispatcher;
75 ipc_targets_[IPC_GDI_GETSUGGESTEDOPMPROTECTEDOUTPUTARRAYSIZE_TAG] =
76 dispatcher;
77 ipc_targets_[IPC_GDI_SETOPMSIGNINGKEYANDSEQUENCENUMBERS_TAG] = dispatcher;
65 process_mitigations_win32k_dispatcher_.reset(dispatcher); 78 process_mitigations_win32k_dispatcher_.reset(dispatcher);
66 } 79 }
67 80
68 TopLevelDispatcher::~TopLevelDispatcher() {} 81 TopLevelDispatcher::~TopLevelDispatcher() {}
69 82
70 // When an IPC is ready in any of the targets we get called. We manage an array 83 // When an IPC is ready in any of the targets we get called. We manage an array
71 // of IPC dispatchers which are keyed on the IPC tag so we normally delegate 84 // of IPC dispatchers which are keyed on the IPC tag so we normally delegate
72 // to the appropriate dispatcher unless we can handle the IPC call ourselves. 85 // to the appropriate dispatcher unless we can handle the IPC call ourselves.
73 Dispatcher* TopLevelDispatcher::OnMessageReady(IPCParams* ipc, 86 Dispatcher* TopLevelDispatcher::OnMessageReady(IPCParams* ipc,
74 CallbackGeneric* callback) { 87 CallbackGeneric* callback) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 145 }
133 146
134 Dispatcher* TopLevelDispatcher::GetDispatcher(int ipc_tag) { 147 Dispatcher* TopLevelDispatcher::GetDispatcher(int ipc_tag) {
135 if (ipc_tag >= IPC_LAST_TAG || ipc_tag <= IPC_UNUSED_TAG) 148 if (ipc_tag >= IPC_LAST_TAG || ipc_tag <= IPC_UNUSED_TAG)
136 return NULL; 149 return NULL;
137 150
138 return ipc_targets_[ipc_tag]; 151 return ipc_targets_[ipc_tag];
139 } 152 }
140 153
141 } // namespace sandbox 154 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/sandbox_policy_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698