| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/common/sandbox_policy.h" | 5 #include "content/common/sandbox_policy.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/debugger.h" | 10 #include "base/debug/debugger.h" |
| 11 #include "base/debug/trace_event.h" | 11 #include "base/debug/trace_event.h" |
| 12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
| 13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
| 16 #include "base/process_util.h" | 16 #include "base/process_util.h" |
| 17 #include "base/string_util.h" | 17 #include "base/string_util.h" |
| 18 #include "base/stringprintf.h" | 18 #include "base/stringprintf.h" |
| 19 #include "base/win/iat_patch_function.h" | 19 #include "base/win/iat_patch_function.h" |
| 20 #include "base/win/scoped_handle.h" | 20 #include "base/win/scoped_handle.h" |
| 21 #include "base/win/scoped_process_information.h" | 21 #include "base/win/scoped_process_information.h" |
| 22 #include "base/win/windows_version.h" | 22 #include "base/win/windows_version.h" |
| 23 #include "content/common/debug_flags.h" | 23 #include "content/common/debug_flags.h" |
| 24 #include "content/public/common/content_client.h" | 24 #include "content/public/common/content_client.h" |
| 25 #include "content/public/common/content_switches.h" | 25 #include "content/public/common/content_switches.h" |
| 26 #include "content/public/common/process_type.h" | 26 #include "content/public/common/process_type.h" |
| 27 #include "content/public/common/sandbox_init.h" | 27 #include "content/public/common/sandbox_init.h" |
| 28 #include "sandbox/src/sandbox.h" | 28 #include "sandbox/win/src/sandbox.h" |
| 29 #include "sandbox/src/sandbox_nt_util.h" | 29 #include "sandbox/win/src/sandbox_nt_util.h" |
| 30 #include "sandbox/src/win_utils.h" | 30 #include "sandbox/win/src/win_utils.h" |
| 31 #include "ui/gl/gl_switches.h" | 31 #include "ui/gl/gl_switches.h" |
| 32 | 32 |
| 33 static sandbox::BrokerServices* g_broker_services = NULL; | 33 static sandbox::BrokerServices* g_broker_services = NULL; |
| 34 static sandbox::TargetServices* g_target_services = NULL; | 34 static sandbox::TargetServices* g_target_services = NULL; |
| 35 | 35 |
| 36 namespace { | 36 namespace { |
| 37 | 37 |
| 38 // The DLLs listed here are known (or under strong suspicion) of causing crashes | 38 // The DLLs listed here are known (or under strong suspicion) of causing crashes |
| 39 // when they are loaded in the renderer. Note: at runtime we generate short | 39 // when they are loaded in the renderer. Note: at runtime we generate short |
| 40 // versions of the dll name only if the dll has an extension. | 40 // versions of the dll name only if the dll has an extension. |
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; | 849 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; |
| 850 } | 850 } |
| 851 | 851 |
| 852 base::ProcessHandle StartProcessWithAccess( | 852 base::ProcessHandle StartProcessWithAccess( |
| 853 CommandLine* cmd_line, | 853 CommandLine* cmd_line, |
| 854 const FilePath& exposed_dir) { | 854 const FilePath& exposed_dir) { |
| 855 return sandbox::StartProcessWithAccess(cmd_line, exposed_dir); | 855 return sandbox::StartProcessWithAccess(cmd_line, exposed_dir); |
| 856 } | 856 } |
| 857 | 857 |
| 858 } // namespace content | 858 } // namespace content |
| OLD | NEW |