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/public/app/content_main_runner.h" | 5 #include "content/public/app/content_main_runner.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include "base/allocator/allocator_extension.h" | 9 #include "base/allocator/allocator_extension.h" |
10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 189 |
190 base::MachSendMessage child_message(kMessageId); | 190 base::MachSendMessage child_message(kMessageId); |
191 if (!child_message.AddDescriptor(mach_task_self())) { | 191 if (!child_message.AddDescriptor(mach_task_self())) { |
192 LOG(ERROR) << "child AddDescriptor(mach_task_self()) failed."; | 192 LOG(ERROR) << "child AddDescriptor(mach_task_self()) failed."; |
193 return; | 193 return; |
194 } | 194 } |
195 | 195 |
196 base::MachPortSender child_sender(mach_port_name.c_str()); | 196 base::MachPortSender child_sender(mach_port_name.c_str()); |
197 kern_return_t err = child_sender.SendMessage(child_message, kTimeoutMs); | 197 kern_return_t err = child_sender.SendMessage(child_message, kTimeoutMs); |
198 if (err != KERN_SUCCESS) { | 198 if (err != KERN_SUCCESS) { |
199 LOG(ERROR) << StringPrintf("child SendMessage() failed: 0x%x %s", err, | 199 LOG(ERROR) << |
200 mach_error_string(err)); | 200 base::StringPrintf("child SendMessage() failed: 0x%x %s", err, |
| 201 mach_error_string(err)); |
201 } | 202 } |
202 } | 203 } |
203 | 204 |
204 #endif // defined(OS_WIN) | 205 #endif // defined(OS_WIN) |
205 | 206 |
206 #if defined(OS_POSIX) && !defined(OS_IOS) | 207 #if defined(OS_POSIX) && !defined(OS_IOS) |
207 | 208 |
208 // Setup signal-handling state: resanitize most signals, ignore SIGPIPE. | 209 // Setup signal-handling state: resanitize most signals, ignore SIGPIPE. |
209 void SetupSignalHandlers() { | 210 void SetupSignalHandlers() { |
210 // Sanitise our signal handling state. Signals that were ignored by our | 211 // Sanitise our signal handling state. Signals that were ignored by our |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 | 818 |
818 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 819 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
819 }; | 820 }; |
820 | 821 |
821 // static | 822 // static |
822 ContentMainRunner* ContentMainRunner::Create() { | 823 ContentMainRunner* ContentMainRunner::Create() { |
823 return new ContentMainRunnerImpl(); | 824 return new ContentMainRunnerImpl(); |
824 } | 825 } |
825 | 826 |
826 } // namespace content | 827 } // namespace content |
OLD | NEW |