| OLD | NEW |
| 1 // Copyright (c) 2006-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> |
| 8 |
| 7 #include "app/win_util.h" | 9 #include "app/win_util.h" |
| 8 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 9 #include "base/debug_util.h" | 11 #include "base/debug_util.h" |
| 10 #include "base/file_util.h" | 12 #include "base/file_util.h" |
| 11 #include "base/logging.h" | 13 #include "base/logging.h" |
| 12 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 13 #include "base/process_util.h" | 15 #include "base/process_util.h" |
| 14 #include "base/registry.h" | 16 #include "base/registry.h" |
| 15 #include "base/string_util.h" | 17 #include "base/string_util.h" |
| 16 #include "base/win_util.h" | 18 #include "base/win_util.h" |
| 17 #include "chrome/common/child_process_info.h" | 19 #include "chrome/common/child_process_info.h" |
| 18 #include "chrome/common/chrome_constants.h" | 20 #include "chrome/common/chrome_constants.h" |
| 19 #include "chrome/common/chrome_paths.h" | 21 #include "chrome/common/chrome_paths.h" |
| 20 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
| 21 #include "chrome/common/debug_flags.h" | 23 #include "chrome/common/debug_flags.h" |
| 22 #include "sandbox/src/sandbox.h" | 24 #include "sandbox/src/sandbox.h" |
| 23 #include "webkit/glue/plugins/plugin_list.h" | |
| 24 | 25 |
| 25 static sandbox::BrokerServices* g_broker_services = NULL; | 26 static sandbox::BrokerServices* g_broker_services = NULL; |
| 26 | 27 |
| 27 namespace { | 28 namespace { |
| 28 | 29 |
| 29 // The DLLs listed here are known (or under strong suspicion) of causing crashes | 30 // The DLLs listed here are known (or under strong suspicion) of causing crashes |
| 30 // when they are loaded in the renderer. | 31 // when they are loaded in the renderer. |
| 31 const wchar_t* const kTroublesomeDlls[] = { | 32 const wchar_t* const kTroublesomeDlls[] = { |
| 32 L"adialhk.dll", // Kaspersky Internet Security. | 33 L"adialhk.dll", // Kaspersky Internet Security. |
| 33 L"acpiz.dll", // Unknown. | 34 L"acpiz.dll", // Unknown. |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 process = target.hProcess; | 488 process = target.hProcess; |
| 488 | 489 |
| 489 // Help the process a little. It can't start the debugger by itself if | 490 // Help the process a little. It can't start the debugger by itself if |
| 490 // the process is in a sandbox. | 491 // the process is in a sandbox. |
| 491 if (child_needs_help) | 492 if (child_needs_help) |
| 492 DebugUtil::SpawnDebuggerOnProcess(target.dwProcessId); | 493 DebugUtil::SpawnDebuggerOnProcess(target.dwProcessId); |
| 493 | 494 |
| 494 return process; | 495 return process; |
| 495 } | 496 } |
| 496 | 497 |
| 497 } // namespace sandbox | 498 } // namespace sandbox |
| OLD | NEW |