| 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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 | 561 |
| 562 #if !defined(OS_WIN) | 562 #if !defined(OS_WIN) |
| 563 argc = params.argc; | 563 argc = params.argc; |
| 564 argv = params.argv; | 564 argv = params.argv; |
| 565 #endif | 565 #endif |
| 566 | 566 |
| 567 base::CommandLine::Init(argc, argv); | 567 base::CommandLine::Init(argc, argv); |
| 568 | 568 |
| 569 base::EnableTerminationOnHeapCorruption(); | 569 base::EnableTerminationOnHeapCorruption(); |
| 570 | 570 |
| 571 // Enable profiler recording right after command line is initialized. |
| 572 delegate_->EnableProfilerRecording(); |
| 573 |
| 571 #if !defined(OS_IOS) | 574 #if !defined(OS_IOS) |
| 572 SetProcessTitleFromCommandLine(argv); | 575 SetProcessTitleFromCommandLine(argv); |
| 573 #endif | 576 #endif |
| 574 #endif // !OS_ANDROID | 577 #endif // !OS_ANDROID |
| 575 | 578 |
| 576 int exit_code = 0; | 579 int exit_code = 0; |
| 577 if (delegate_ && delegate_->BasicStartupComplete(&exit_code)) | 580 if (delegate_ && delegate_->BasicStartupComplete(&exit_code)) |
| 578 return exit_code; | 581 return exit_code; |
| 579 | 582 |
| 580 completed_basic_startup_ = true; | 583 completed_basic_startup_ = true; |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 | 829 |
| 827 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 830 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
| 828 }; | 831 }; |
| 829 | 832 |
| 830 // static | 833 // static |
| 831 ContentMainRunner* ContentMainRunner::Create() { | 834 ContentMainRunner* ContentMainRunner::Create() { |
| 832 return new ContentMainRunnerImpl(); | 835 return new ContentMainRunnerImpl(); |
| 833 } | 836 } |
| 834 | 837 |
| 835 } // namespace content | 838 } // namespace content |
| OLD | NEW |