OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/app/content_main.h" | 5 #include "content/app/content_main.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/debugger.h" | 9 #include "base/debug/debugger.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 | 308 |
309 // Set C library locale to make sure CommandLine can parse argument values | 309 // Set C library locale to make sure CommandLine can parse argument values |
310 // in correct encoding. | 310 // in correct encoding. |
311 setlocale(LC_ALL, ""); | 311 setlocale(LC_ALL, ""); |
312 | 312 |
313 SetupSignalHandlers(); | 313 SetupSignalHandlers(); |
314 | 314 |
315 base::GlobalDescriptors* g_fds = base::GlobalDescriptors::GetInstance(); | 315 base::GlobalDescriptors* g_fds = base::GlobalDescriptors::GetInstance(); |
316 g_fds->Set(kPrimaryIPCChannel, | 316 g_fds->Set(kPrimaryIPCChannel, |
317 kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor); | 317 kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor); |
318 #if defined(OS_LINUX) | 318 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
319 g_fds->Set(kCrashDumpSignal, | 319 g_fds->Set(kCrashDumpSignal, |
320 kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); | 320 kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); |
321 #endif | 321 #endif |
322 | 322 |
323 #endif // OS_WIN | 323 #endif // OS_WIN |
324 | 324 |
325 base::EnableTerminationOnHeapCorruption(); | 325 base::EnableTerminationOnHeapCorruption(); |
326 base::EnableTerminationOnOutOfMemory(); | 326 base::EnableTerminationOnOutOfMemory(); |
327 | 327 |
328 // The exit manager is in charge of calling the dtors of singleton objects. | 328 // The exit manager is in charge of calling the dtors of singleton objects. |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 _CrtDumpMemoryLeaks(); | 459 _CrtDumpMemoryLeaks(); |
460 #endif // _CRTDBG_MAP_ALLOC | 460 #endif // _CRTDBG_MAP_ALLOC |
461 | 461 |
462 _Module.Term(); | 462 _Module.Term(); |
463 #endif // OS_WIN | 463 #endif // OS_WIN |
464 | 464 |
465 return exit_code; | 465 return exit_code; |
466 } | 466 } |
467 | 467 |
468 } // namespace content | 468 } // namespace content |
OLD | NEW |