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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 !browser_command_line.HasSwitch(switches::kNoSandbox) && | 487 !browser_command_line.HasSwitch(switches::kNoSandbox) && |
488 (type != ChildProcessInfo::PLUGIN_PROCESS || | 488 (type != ChildProcessInfo::PLUGIN_PROCESS || |
489 browser_command_line.HasSwitch(switches::kSafePlugins)) && | 489 browser_command_line.HasSwitch(switches::kSafePlugins)) && |
490 (type != ChildProcessInfo::GPU_PROCESS); | 490 (type != ChildProcessInfo::GPU_PROCESS); |
491 #if !defined (GOOGLE_CHROME_BUILD) | 491 #if !defined (GOOGLE_CHROME_BUILD) |
492 if (browser_command_line.HasSwitch(switches::kInProcessPlugins)) { | 492 if (browser_command_line.HasSwitch(switches::kInProcessPlugins)) { |
493 // In process plugins won't work if the sandbox is enabled. | 493 // In process plugins won't work if the sandbox is enabled. |
494 in_sandbox = false; | 494 in_sandbox = false; |
495 } | 495 } |
496 #endif | 496 #endif |
497 if (!browser_command_line.HasSwitch(switches::kDisableExperimentalWebGL) && | 497 if (browser_command_line.HasSwitch(switches::kEnableExperimentalWebGL) && |
498 browser_command_line.HasSwitch(switches::kInProcessWebGL)) { | 498 browser_command_line.HasSwitch(switches::kInProcessWebGL)) { |
499 // In process WebGL won't work if the sandbox is enabled. | 499 // In process WebGL won't work if the sandbox is enabled. |
500 in_sandbox = false; | 500 in_sandbox = false; |
501 } | 501 } |
502 | 502 |
503 // Propagate the Chrome Frame flag to sandboxed processes if present. | 503 // Propagate the Chrome Frame flag to sandboxed processes if present. |
504 if (browser_command_line.HasSwitch(switches::kChromeFrame)) { | 504 if (browser_command_line.HasSwitch(switches::kChromeFrame)) { |
505 if (!cmd_line->HasSwitch(switches::kChromeFrame)) { | 505 if (!cmd_line->HasSwitch(switches::kChromeFrame)) { |
506 cmd_line->AppendSwitch(switches::kChromeFrame); | 506 cmd_line->AppendSwitch(switches::kChromeFrame); |
507 } | 507 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 | 578 |
579 // Help the process a little. It can't start the debugger by itself if | 579 // Help the process a little. It can't start the debugger by itself if |
580 // the process is in a sandbox. | 580 // the process is in a sandbox. |
581 if (child_needs_help) | 581 if (child_needs_help) |
582 DebugUtil::SpawnDebuggerOnProcess(target.dwProcessId); | 582 DebugUtil::SpawnDebuggerOnProcess(target.dwProcessId); |
583 | 583 |
584 return process; | 584 return process; |
585 } | 585 } |
586 | 586 |
587 } // namespace sandbox | 587 } // namespace sandbox |
OLD | NEW |