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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 #if defined(OS_LINUX) || defined(OS_OPENBSD) | 550 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
551 g_fds->Set(kCrashDumpSignal, | 551 g_fds->Set(kCrashDumpSignal, |
552 kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); | 552 kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); |
553 #endif | 553 #endif |
554 | 554 |
555 #endif // !OS_WIN | 555 #endif // !OS_WIN |
556 | 556 |
557 is_initialized_ = true; | 557 is_initialized_ = true; |
558 delegate_ = params.delegate; | 558 delegate_ = params.delegate; |
559 | 559 |
560 if (params.enable_termination_on_heap_corruption) | 560 base::EnableTerminationOnHeapCorruption(); |
561 base::EnableTerminationOnHeapCorruption(); | |
562 base::EnableTerminationOnOutOfMemory(); | 561 base::EnableTerminationOnOutOfMemory(); |
563 | 562 |
564 // The exit manager is in charge of calling the dtors of singleton objects. | 563 // The exit manager is in charge of calling the dtors of singleton objects. |
565 // On Android, AtExitManager is set up when library is loaded. | 564 // On Android, AtExitManager is set up when library is loaded. |
566 // On iOS, it's set up in main(), which can't call directly through to here. | 565 // On iOS, it's set up in main(), which can't call directly through to here. |
567 // A consequence of this is that you can't use the ctor/dtor-based | 566 // A consequence of this is that you can't use the ctor/dtor-based |
568 // TRACE_EVENT methods on Linux or iOS builds till after we set this up. | 567 // TRACE_EVENT methods on Linux or iOS builds till after we set this up. |
569 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 568 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
570 if (!ui_task_) { | 569 if (!ui_task_) { |
571 // When running browser tests, don't create a second AtExitManager as that | 570 // When running browser tests, don't create a second AtExitManager as that |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 | 821 |
823 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 822 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
824 }; | 823 }; |
825 | 824 |
826 // static | 825 // static |
827 ContentMainRunner* ContentMainRunner::Create() { | 826 ContentMainRunner* ContentMainRunner::Create() { |
828 return new ContentMainRunnerImpl(); | 827 return new ContentMainRunnerImpl(); |
829 } | 828 } |
830 | 829 |
831 } // namespace content | 830 } // namespace content |
OLD | NEW |