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 528 matching lines...) Loading... |
539 // The user has explicity opted-out from all sandboxing. | 539 // The user has explicity opted-out from all sandboxing. |
540 in_sandbox = false; | 540 in_sandbox = false; |
541 } | 541 } |
542 | 542 |
543 #if !defined (GOOGLE_CHROME_BUILD) | 543 #if !defined (GOOGLE_CHROME_BUILD) |
544 if (browser_command_line.HasSwitch(switches::kInProcessPlugins)) { | 544 if (browser_command_line.HasSwitch(switches::kInProcessPlugins)) { |
545 // In process plugins won't work if the sandbox is enabled. | 545 // In process plugins won't work if the sandbox is enabled. |
546 in_sandbox = false; | 546 in_sandbox = false; |
547 } | 547 } |
548 #endif | 548 #endif |
549 if (!browser_command_line.HasSwitch(switches::kDisable3DAPIs) && | 549 if (!browser_command_line.HasSwitch(switches::kDisableExperimentalWebGL) && |
550 !browser_command_line.HasSwitch(switches::kDisableExperimentalWebGL) && | |
551 browser_command_line.HasSwitch(switches::kInProcessWebGL)) { | 550 browser_command_line.HasSwitch(switches::kInProcessWebGL)) { |
552 // In process WebGL won't work if the sandbox is enabled. | 551 // In process WebGL won't work if the sandbox is enabled. |
553 in_sandbox = false; | 552 in_sandbox = false; |
554 } | 553 } |
555 | 554 |
556 // Propagate the Chrome Frame flag to sandboxed processes if present. | 555 // Propagate the Chrome Frame flag to sandboxed processes if present. |
557 if (browser_command_line.HasSwitch(switches::kChromeFrame)) { | 556 if (browser_command_line.HasSwitch(switches::kChromeFrame)) { |
558 if (!cmd_line->HasSwitch(switches::kChromeFrame)) { | 557 if (!cmd_line->HasSwitch(switches::kChromeFrame)) { |
559 cmd_line->AppendSwitch(switches::kChromeFrame); | 558 cmd_line->AppendSwitch(switches::kChromeFrame); |
560 } | 559 } |
(...skipping 70 matching lines...) Loading... |
631 | 630 |
632 // Help the process a little. It can't start the debugger by itself if | 631 // Help the process a little. It can't start the debugger by itself if |
633 // the process is in a sandbox. | 632 // the process is in a sandbox. |
634 if (child_needs_help) | 633 if (child_needs_help) |
635 base::debug::SpawnDebuggerOnProcess(target.dwProcessId); | 634 base::debug::SpawnDebuggerOnProcess(target.dwProcessId); |
636 | 635 |
637 return process; | 636 return process; |
638 } | 637 } |
639 | 638 |
640 } // namespace sandbox | 639 } // namespace sandbox |
OLD | NEW |