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

Side by Side Diff: content/common/sandbox_policy.cc

Issue 7351003: Clean up users of a deprecated base::LaunchApp API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win-only Created 9 years, 5 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 | « content/browser/zygote_host_linux.cc ('k') | media/audio/linux/audio_manager_linux.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/common/sandbox_policy.h" 5 #include "content/common/sandbox_policy.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/debugger.h" 10 #include "base/debug/debugger.h"
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 sandbox::TargetPolicy* policy = g_broker_services->CreatePolicy(); 393 sandbox::TargetPolicy* policy = g_broker_services->CreatePolicy();
394 394
395 if (type == ChildProcessInfo::PLUGIN_PROCESS && 395 if (type == ChildProcessInfo::PLUGIN_PROCESS &&
396 !browser_command_line.HasSwitch(switches::kNoSandbox) && 396 !browser_command_line.HasSwitch(switches::kNoSandbox) &&
397 content::GetContentClient()->SandboxPlugin(cmd_line, policy)) { 397 content::GetContentClient()->SandboxPlugin(cmd_line, policy)) {
398 in_sandbox = true; 398 in_sandbox = true;
399 } 399 }
400 400
401 if (!in_sandbox) { 401 if (!in_sandbox) {
402 policy->Release(); 402 policy->Release();
403 base::LaunchApp(*cmd_line, false, false, &process); 403 base::LaunchOptions options;
404 options.process_handle = &process;
405 base::LaunchProcess(*cmd_line, options);
404 return process; 406 return process;
405 } 407 }
406 408
407 if (type == ChildProcessInfo::PLUGIN_PROCESS) { 409 if (type == ChildProcessInfo::PLUGIN_PROCESS) {
408 AddDllEvictionPolicy(policy); 410 AddDllEvictionPolicy(policy);
409 } else if (type == ChildProcessInfo::GPU_PROCESS) { 411 } else if (type == ChildProcessInfo::GPU_PROCESS) {
410 if (!AddPolicyForGPU(cmd_line, policy)) 412 if (!AddPolicyForGPU(cmd_line, policy))
411 return 0; 413 return 0;
412 } else if (type == ChildProcessInfo::PPAPI_PLUGIN_PROCESS) { 414 } else if (type == ChildProcessInfo::PPAPI_PLUGIN_PROCESS) {
413 if (!AddPolicyForPepperPlugin(policy)) 415 if (!AddPolicyForPepperPlugin(policy))
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 464
463 // Help the process a little. It can't start the debugger by itself if 465 // Help the process a little. It can't start the debugger by itself if
464 // the process is in a sandbox. 466 // the process is in a sandbox.
465 if (child_needs_help) 467 if (child_needs_help)
466 base::debug::SpawnDebuggerOnProcess(target.dwProcessId); 468 base::debug::SpawnDebuggerOnProcess(target.dwProcessId);
467 469
468 return process; 470 return process;
469 } 471 }
470 472
471 } // namespace sandbox 473 } // namespace sandbox
OLDNEW
« no previous file with comments | « content/browser/zygote_host_linux.cc ('k') | media/audio/linux/audio_manager_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698