| 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_init_wrapper.h" | 5 #include "chrome/common/sandbox_init_wrapper.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 (process_type == switches::kServiceProcess)) { | 60 (process_type == switches::kServiceProcess)) { |
| 61 return true; | 61 return true; |
| 62 } else { | 62 } else { |
| 63 // Failsafe: If you hit an unreached here, is your new process type in need | 63 // Failsafe: If you hit an unreached here, is your new process type in need |
| 64 // of sandboxing? | 64 // of sandboxing? |
| 65 NOTREACHED(); | 65 NOTREACHED(); |
| 66 return true; | 66 return true; |
| 67 } | 67 } |
| 68 | 68 |
| 69 // Warm up APIs before turning on the sandbox. | 69 // Warm up APIs before turning on the sandbox. |
| 70 Sandbox::SandboxWarmup(); | 70 Sandbox::SandboxWarmup(sandbox_process_type); |
| 71 | 71 |
| 72 // Actually sandbox the process. | 72 // Actually sandbox the process. |
| 73 return Sandbox::EnableSandbox(sandbox_process_type, allowed_dir); | 73 return Sandbox::EnableSandbox(sandbox_process_type, allowed_dir); |
| 74 } | 74 } |
| OLD | NEW |