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

Side by Side Diff: sandbox/src/sharedmem_ipc_server.cc

Issue 757001: Second round of sbox changes for 64 bit port... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « sandbox/src/sharedmem_ipc_server.h ('k') | sandbox/tests/validation_tests/commands.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/callback.h" 5 #include "base/callback.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/scoped_ptr.h" 7 #include "base/scoped_ptr.h"
8 #include "sandbox/src/sharedmem_ipc_server.h" 8 #include "sandbox/src/sharedmem_ipc_server.h"
9 #include "sandbox/src/sharedmem_ipc_client.h" 9 #include "sandbox/src/sharedmem_ipc_client.h"
10 #include "sandbox/src/sandbox.h" 10 #include "sandbox/src/sandbox.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 scoped_ptr<std::wstring> data(new std::wstring); 164 scoped_ptr<std::wstring> data(new std::wstring);
165 if (!params->GetParameterStr(i, data.get())) { 165 if (!params->GetParameterStr(i, data.get())) {
166 args[i] = 0; 166 args[i] = 0;
167 ReleaseArgs(ipc_params, args); 167 ReleaseArgs(ipc_params, args);
168 return false; 168 return false;
169 } 169 }
170 args[i] = data.release(); 170 args[i] = data.release();
171 break; 171 break;
172 } 172 }
173 case ULONG_TYPE: { 173 case ULONG_TYPE: {
174 ULONG data; 174 uint32 data;
175 if (!params->GetParameter32(i, &data)) { 175 if (!params->GetParameter32(i, &data)) {
176 ReleaseArgs(ipc_params, args); 176 ReleaseArgs(ipc_params, args);
177 return false; 177 return false;
178 } 178 }
179 IPCInt ipc_int(data); 179 IPCInt ipc_int(data);
180 args[i] = ipc_int.AsVoidPtr(); 180 args[i] = ipc_int.AsVoidPtr();
181 break; 181 break;
182 } 182 }
183 case VOIDPTR_TYPE : {
184 void* data;
185 if (!params->GetParameterVoidPtr(i, &data)) {
186 ReleaseArgs(ipc_params, args);
187 return false;
188 }
189 args[i] = data;
190 break;
191 }
183 case INOUTPTR_TYPE: { 192 case INOUTPTR_TYPE: {
184 if (!args[i]) { 193 if (!args[i]) {
185 ReleaseArgs(ipc_params, args); 194 ReleaseArgs(ipc_params, args);
186 return false; 195 return false;
187 } 196 }
188 CountedBuffer* buffer = new CountedBuffer(args[i] , size); 197 CountedBuffer* buffer = new CountedBuffer(args[i] , size);
189 args[i] = buffer; 198 args[i] = buffer;
190 break; 199 break;
191 } 200 }
192 default: break; 201 default: break;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 } 403 }
395 *server_pong = ::CreateEventW(NULL, FALSE, FALSE, NULL); 404 *server_pong = ::CreateEventW(NULL, FALSE, FALSE, NULL);
396 if (!::DuplicateHandle(::GetCurrentProcess(), *server_pong, target_process_, 405 if (!::DuplicateHandle(::GetCurrentProcess(), *server_pong, target_process_,
397 client_pong, kDesiredAccess, FALSE, 0)) { 406 client_pong, kDesiredAccess, FALSE, 0)) {
398 return false; 407 return false;
399 } 408 }
400 return true; 409 return true;
401 } 410 }
402 411
403 } // namespace sandbox 412 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/src/sharedmem_ipc_server.h ('k') | sandbox/tests/validation_tests/commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698