OLD | NEW |
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 "chrome/common/sandbox_policy.h" | 5 #include "chrome/common/sandbox_policy.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/win_util.h" | 9 #include "app/win_util.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 !browser_command_line.HasSwitch(switches::kNoSandbox) && | 453 !browser_command_line.HasSwitch(switches::kNoSandbox) && |
454 (type != ChildProcessInfo::PLUGIN_PROCESS || | 454 (type != ChildProcessInfo::PLUGIN_PROCESS || |
455 browser_command_line.HasSwitch(switches::kSafePlugins)) && | 455 browser_command_line.HasSwitch(switches::kSafePlugins)) && |
456 (type != ChildProcessInfo::GPU_PROCESS); | 456 (type != ChildProcessInfo::GPU_PROCESS); |
457 #if !defined (GOOGLE_CHROME_BUILD) | 457 #if !defined (GOOGLE_CHROME_BUILD) |
458 if (browser_command_line.HasSwitch(switches::kInProcessPlugins)) { | 458 if (browser_command_line.HasSwitch(switches::kInProcessPlugins)) { |
459 // In process plugins won't work if the sandbox is enabled. | 459 // In process plugins won't work if the sandbox is enabled. |
460 in_sandbox = false; | 460 in_sandbox = false; |
461 } | 461 } |
462 #endif | 462 #endif |
463 if (browser_command_line.HasSwitch(switches::kEnableExperimentalWebGL) && | 463 if (!browser_command_line.HasSwitch(switches::kDisableExperimentalWebGL) && |
464 browser_command_line.HasSwitch(switches::kInProcessWebGL)) { | 464 browser_command_line.HasSwitch(switches::kInProcessWebGL)) { |
465 // In process WebGL won't work if the sandbox is enabled. | 465 // In process WebGL won't work if the sandbox is enabled. |
466 in_sandbox = false; | 466 in_sandbox = false; |
467 } | 467 } |
468 | 468 |
469 // Propagate the Chrome Frame flag to sandboxed processes if present. | 469 // Propagate the Chrome Frame flag to sandboxed processes if present. |
470 if (browser_command_line.HasSwitch(switches::kChromeFrame)) { | 470 if (browser_command_line.HasSwitch(switches::kChromeFrame)) { |
471 if (!cmd_line->HasSwitch(switches::kChromeFrame)) { | 471 if (!cmd_line->HasSwitch(switches::kChromeFrame)) { |
472 cmd_line->AppendSwitch(switches::kChromeFrame); | 472 cmd_line->AppendSwitch(switches::kChromeFrame); |
473 } | 473 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 | 544 |
545 // Help the process a little. It can't start the debugger by itself if | 545 // Help the process a little. It can't start the debugger by itself if |
546 // the process is in a sandbox. | 546 // the process is in a sandbox. |
547 if (child_needs_help) | 547 if (child_needs_help) |
548 DebugUtil::SpawnDebuggerOnProcess(target.dwProcessId); | 548 DebugUtil::SpawnDebuggerOnProcess(target.dwProcessId); |
549 | 549 |
550 return process; | 550 return process; |
551 } | 551 } |
552 | 552 |
553 } // namespace sandbox | 553 } // namespace sandbox |
OLD | NEW |