OLD | NEW |
1 // Copyright (c) 2006-2009 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 "chrome/browser/sandbox_policy.h" | 5 #include "chrome/browser/sandbox_policy.h" |
6 | 6 |
7 #include "app/win_util.h" | 7 #include "app/win_util.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug_util.h" | 9 #include "base/debug_util.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 !browser_command_line.HasSwitch(switches::kNoSandbox) && | 357 !browser_command_line.HasSwitch(switches::kNoSandbox) && |
358 (type != ChildProcessInfo::PLUGIN_PROCESS || | 358 (type != ChildProcessInfo::PLUGIN_PROCESS || |
359 browser_command_line.HasSwitch(switches::kSafePlugins)); | 359 browser_command_line.HasSwitch(switches::kSafePlugins)); |
360 #if !defined (GOOGLE_CHROME_BUILD) | 360 #if !defined (GOOGLE_CHROME_BUILD) |
361 if (browser_command_line.HasSwitch(switches::kInProcessPlugins)) { | 361 if (browser_command_line.HasSwitch(switches::kInProcessPlugins)) { |
362 // In process plugins won't work if the sandbox is enabled. | 362 // In process plugins won't work if the sandbox is enabled. |
363 in_sandbox = false; | 363 in_sandbox = false; |
364 } | 364 } |
365 #endif | 365 #endif |
366 | 366 |
| 367 // Propagate the Chrome Frame flag to sandboxed processes if present. |
| 368 if (browser_command_line.HasSwitch(switches::kChromeFrame)) { |
| 369 if (!cmd_line->HasSwitch(switches::kChromeFrame)) { |
| 370 cmd_line->AppendSwitch(switches::kChromeFrame); |
| 371 } |
| 372 } |
| 373 |
367 bool child_needs_help = | 374 bool child_needs_help = |
368 DebugFlags::ProcessDebugFlags(cmd_line, type, in_sandbox); | 375 DebugFlags::ProcessDebugFlags(cmd_line, type, in_sandbox); |
369 | 376 |
370 if (!in_sandbox) { | 377 if (!in_sandbox) { |
371 base::LaunchApp(*cmd_line, false, false, &process); | 378 base::LaunchApp(*cmd_line, false, false, &process); |
372 return process; | 379 return process; |
373 } | 380 } |
374 | 381 |
375 // spawn the child process in the sandbox | 382 // spawn the child process in the sandbox |
376 sandbox::BrokerServices* broker_service = | 383 sandbox::BrokerServices* broker_service = |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 | 439 |
433 // Help the process a little. It can't start the debugger by itself if | 440 // Help the process a little. It can't start the debugger by itself if |
434 // the process is in a sandbox. | 441 // the process is in a sandbox. |
435 if (child_needs_help) | 442 if (child_needs_help) |
436 DebugUtil::SpawnDebuggerOnProcess(target.dwProcessId); | 443 DebugUtil::SpawnDebuggerOnProcess(target.dwProcessId); |
437 | 444 |
438 return process; | 445 return process; |
439 } | 446 } |
440 | 447 |
441 } // namespace sandbox | 448 } // namespace sandbox |
OLD | NEW |