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/browser/utility_process_host_impl.h" | 5 #include "content/browser/utility_process_host_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 switches::kUtilityProcess); | 138 switches::kUtilityProcess); |
139 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); | 139 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); |
140 std::string locale = | 140 std::string locale = |
141 content::GetContentClient()->browser()->GetApplicationLocale(); | 141 content::GetContentClient()->browser()->GetApplicationLocale(); |
142 cmd_line->AppendSwitchASCII(switches::kLang, locale); | 142 cmd_line->AppendSwitchASCII(switches::kLang, locale); |
143 | 143 |
144 if (browser_command_line.HasSwitch(switches::kChromeFrame)) | 144 if (browser_command_line.HasSwitch(switches::kChromeFrame)) |
145 cmd_line->AppendSwitch(switches::kChromeFrame); | 145 cmd_line->AppendSwitch(switches::kChromeFrame); |
146 if (no_sandbox_ || browser_command_line.HasSwitch(switches::kNoSandbox)) | 146 if (no_sandbox_ || browser_command_line.HasSwitch(switches::kNoSandbox)) |
147 cmd_line->AppendSwitch(switches::kNoSandbox); | 147 cmd_line->AppendSwitch(switches::kNoSandbox); |
| 148 #if defined(OS_MACOSX) |
| 149 if (browser_command_line.HasSwitch(switches::kEnableSandboxLogging)) |
| 150 cmd_line->AppendSwitch(switches::kEnableSandboxLogging); |
| 151 #endif |
148 if (browser_command_line.HasSwitch(switches::kDebugPluginLoading)) | 152 if (browser_command_line.HasSwitch(switches::kDebugPluginLoading)) |
149 cmd_line->AppendSwitch(switches::kDebugPluginLoading); | 153 cmd_line->AppendSwitch(switches::kDebugPluginLoading); |
150 | 154 |
151 #if defined(OS_POSIX) | 155 #if defined(OS_POSIX) |
152 // TODO(port): Sandbox this on Linux. Also, zygote this to work with | 156 // TODO(port): Sandbox this on Linux. Also, zygote this to work with |
153 // Linux updating. | 157 // Linux updating. |
154 if (has_cmd_prefix) { | 158 if (has_cmd_prefix) { |
155 // launch the utility child process with some prefix (usually "xterm -e gdb | 159 // launch the utility child process with some prefix (usually "xterm -e gdb |
156 // --args"). | 160 // --args"). |
157 cmd_line->PrependWrapper(browser_command_line.GetSwitchValueNative( | 161 cmd_line->PrependWrapper(browser_command_line.GetSwitchValueNative( |
(...skipping 29 matching lines...) Expand all Loading... |
187 message)); | 191 message)); |
188 return true; | 192 return true; |
189 } | 193 } |
190 | 194 |
191 void UtilityProcessHostImpl::OnProcessCrashed(int exit_code) { | 195 void UtilityProcessHostImpl::OnProcessCrashed(int exit_code) { |
192 BrowserThread::PostTask( | 196 BrowserThread::PostTask( |
193 client_thread_id_, FROM_HERE, | 197 client_thread_id_, FROM_HERE, |
194 base::Bind(&UtilityProcessHostClient::OnProcessCrashed, client_.get(), | 198 base::Bind(&UtilityProcessHostClient::OnProcessCrashed, client_.get(), |
195 exit_code)); | 199 exit_code)); |
196 } | 200 } |
OLD | NEW |