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

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

Issue 113190: Add support for alternate window station. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/src/broker_services.h" 5 #include "sandbox/src/broker_services.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/platform_thread.h" 8 #include "base/platform_thread.h"
9 #include "sandbox/src/sandbox_policy_base.h" 9 #include "sandbox/src/sandbox_policy_base.h"
10 #include "sandbox/src/sandbox.h" 10 #include "sandbox/src/sandbox.h"
11 #include "sandbox/src/target_process.h" 11 #include "sandbox/src/target_process.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // The thread pool is shared by all the targets 249 // The thread pool is shared by all the targets
250 if (NULL == thread_pool_) 250 if (NULL == thread_pool_)
251 thread_pool_ = new Win2kThreadPool(); 251 thread_pool_ = new Win2kThreadPool();
252 252
253 // Create the TargetProces object and spawn the target suspended. Note that 253 // Create the TargetProces object and spawn the target suspended. Note that
254 // Brokerservices does not own the target object. It is owned by the Policy. 254 // Brokerservices does not own the target object. It is owned by the Policy.
255 PROCESS_INFORMATION process_info = {0}; 255 PROCESS_INFORMATION process_info = {0};
256 TargetProcess* target = new TargetProcess(initial_token, lockdown_token, 256 TargetProcess* target = new TargetProcess(initial_token, lockdown_token,
257 job, thread_pool_); 257 job, thread_pool_);
258 258
259 std::wstring desktop = policy_base->GetDesktop(); 259 std::wstring desktop = policy_base->GetAlternateDesktop();
260
260 win_result = target->Create(exe_path, command_line, 261 win_result = target->Create(exe_path, command_line,
261 desktop.empty() ? NULL : desktop.c_str(), 262 desktop.empty() ? NULL : desktop.c_str(),
262 &process_info); 263 &process_info);
263 if (ERROR_SUCCESS != win_result) 264 if (ERROR_SUCCESS != win_result)
264 return SpawnCleanup(target, win_result); 265 return SpawnCleanup(target, win_result);
265 266
266 if ((INVALID_HANDLE_VALUE == process_info.hProcess) || 267 if ((INVALID_HANDLE_VALUE == process_info.hProcess) ||
267 (INVALID_HANDLE_VALUE == process_info.hThread)) 268 (INVALID_HANDLE_VALUE == process_info.hThread))
268 return SpawnCleanup(target, win_result); 269 return SpawnCleanup(target, win_result);
269 270
(...skipping 25 matching lines...) Expand all
295 return SBOX_ALL_OK; 296 return SBOX_ALL_OK;
296 } 297 }
297 298
298 299
299 ResultCode BrokerServicesBase::WaitForAllTargets() { 300 ResultCode BrokerServicesBase::WaitForAllTargets() {
300 ::WaitForSingleObject(no_targets_, INFINITE); 301 ::WaitForSingleObject(no_targets_, INFINITE);
301 return SBOX_ALL_OK; 302 return SBOX_ALL_OK;
302 } 303 }
303 304
304 } // namespace sandbox 305 } // namespace sandbox
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698