OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 cmd_line->AppendSwitch(switches::kChromeFrame); | 722 cmd_line->AppendSwitch(switches::kChromeFrame); |
723 } | 723 } |
724 } | 724 } |
725 | 725 |
726 // Propagate the --allow-no-job flag if present. | 726 // Propagate the --allow-no-job flag if present. |
727 if (browser_command_line.HasSwitch(switches::kAllowNoSandboxJob) && | 727 if (browser_command_line.HasSwitch(switches::kAllowNoSandboxJob) && |
728 !cmd_line->HasSwitch(switches::kAllowNoSandboxJob)) { | 728 !cmd_line->HasSwitch(switches::kAllowNoSandboxJob)) { |
729 cmd_line->AppendSwitch(switches::kAllowNoSandboxJob); | 729 cmd_line->AppendSwitch(switches::kAllowNoSandboxJob); |
730 } | 730 } |
731 | 731 |
732 bool child_needs_help = | 732 bool child_needs_help = ProcessDebugFlags(cmd_line, type, in_sandbox); |
733 DebugFlags::ProcessDebugFlags(cmd_line, type, in_sandbox); | |
734 | 733 |
735 // Prefetch hints on windows: | 734 // Prefetch hints on windows: |
736 // Using a different prefetch profile per process type will allow Windows | 735 // Using a different prefetch profile per process type will allow Windows |
737 // to create separate pretetch settings for browser, renderer etc. | 736 // to create separate pretetch settings for browser, renderer etc. |
738 cmd_line->AppendArg(base::StringPrintf("/prefetch:%d", type)); | 737 cmd_line->AppendArg(base::StringPrintf("/prefetch:%d", type)); |
739 | 738 |
740 if (!in_sandbox) { | 739 if (!in_sandbox) { |
741 base::ProcessHandle process = 0; | 740 base::ProcessHandle process = 0; |
742 base::LaunchProcess(*cmd_line, base::LaunchOptions(), &process); | 741 base::LaunchProcess(*cmd_line, base::LaunchOptions(), &process); |
743 g_broker_services->AddTargetPeer(process); | 742 g_broker_services->AddTargetPeer(process); |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; | 912 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; |
914 } | 913 } |
915 | 914 |
916 base::ProcessHandle StartProcessWithAccess( | 915 base::ProcessHandle StartProcessWithAccess( |
917 CommandLine* cmd_line, | 916 CommandLine* cmd_line, |
918 const FilePath& exposed_dir) { | 917 const FilePath& exposed_dir) { |
919 return sandbox::StartProcessWithAccess(cmd_line, exposed_dir); | 918 return sandbox::StartProcessWithAccess(cmd_line, exposed_dir); |
920 } | 919 } |
921 | 920 |
922 } // namespace content | 921 } // namespace content |
OLD | NEW |