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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 (type != ChildProcessInfo::NACL_BROKER_PROCESS) && | 525 (type != ChildProcessInfo::NACL_BROKER_PROCESS) && |
526 (type != ChildProcessInfo::GPU_PROCESS) && | 526 (type != ChildProcessInfo::GPU_PROCESS) && |
527 (type != ChildProcessInfo::PLUGIN_PROCESS); | 527 (type != ChildProcessInfo::PLUGIN_PROCESS); |
528 | 528 |
529 // Second case: If it is the plugin process then it depends on it being | 529 // Second case: If it is the plugin process then it depends on it being |
530 // the built-in flash, the user forcing plugins into sandbox or the | 530 // the built-in flash, the user forcing plugins into sandbox or the |
531 // the user explicitly excluding flash from the sandbox. | 531 // the user explicitly excluding flash from the sandbox. |
532 if (!in_sandbox && (type == ChildProcessInfo::PLUGIN_PROCESS)) { | 532 if (!in_sandbox && (type == ChildProcessInfo::PLUGIN_PROCESS)) { |
533 in_sandbox = browser_command_line.HasSwitch(switches::kSafePlugins) || | 533 in_sandbox = browser_command_line.HasSwitch(switches::kSafePlugins) || |
534 (IsBuiltInFlash(cmd_line, NULL) && | 534 (IsBuiltInFlash(cmd_line, NULL) && |
| 535 (base::win::GetVersion() > base::win::VERSION_XP) && |
535 !browser_command_line.HasSwitch(switches::kDisableFlashSandbox)); | 536 !browser_command_line.HasSwitch(switches::kDisableFlashSandbox)); |
536 } | 537 } |
537 | 538 |
538 if (browser_command_line.HasSwitch(switches::kNoSandbox)) { | 539 if (browser_command_line.HasSwitch(switches::kNoSandbox)) { |
539 // The user has explicity opted-out from all sandboxing. | 540 // The user has explicity opted-out from all sandboxing. |
540 in_sandbox = false; | 541 in_sandbox = false; |
541 } | 542 } |
542 | 543 |
543 #if !defined (GOOGLE_CHROME_BUILD) | 544 #if !defined (GOOGLE_CHROME_BUILD) |
544 if (browser_command_line.HasSwitch(switches::kInProcessPlugins)) { | 545 if (browser_command_line.HasSwitch(switches::kInProcessPlugins)) { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 | 631 |
631 // Help the process a little. It can't start the debugger by itself if | 632 // Help the process a little. It can't start the debugger by itself if |
632 // the process is in a sandbox. | 633 // the process is in a sandbox. |
633 if (child_needs_help) | 634 if (child_needs_help) |
634 base::debug::SpawnDebuggerOnProcess(target.dwProcessId); | 635 base::debug::SpawnDebuggerOnProcess(target.dwProcessId); |
635 | 636 |
636 return process; | 637 return process; |
637 } | 638 } |
638 | 639 |
639 } // namespace sandbox | 640 } // namespace sandbox |
OLD | NEW |