| 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 int argc = 0; | 559 int argc = 0; |
| 560 const char** argv = NULL; | 560 const char** argv = NULL; |
| 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 if (!delegate_ || delegate_->ShouldEnableTerminationOnHeapCorruption()) | 569 base::EnableTerminationOnHeapCorruption(); |
| 570 base::EnableTerminationOnHeapCorruption(); | |
| 571 | 570 |
| 572 #if !defined(OS_IOS) | 571 #if !defined(OS_IOS) |
| 573 SetProcessTitleFromCommandLine(argv); | 572 SetProcessTitleFromCommandLine(argv); |
| 574 #endif | 573 #endif |
| 575 #endif // !OS_ANDROID | 574 #endif // !OS_ANDROID |
| 576 | 575 |
| 577 int exit_code = 0; | 576 int exit_code = 0; |
| 578 if (delegate_ && delegate_->BasicStartupComplete(&exit_code)) | 577 if (delegate_ && delegate_->BasicStartupComplete(&exit_code)) |
| 579 return exit_code; | 578 return exit_code; |
| 580 | 579 |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 | 826 |
| 828 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 827 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
| 829 }; | 828 }; |
| 830 | 829 |
| 831 // static | 830 // static |
| 832 ContentMainRunner* ContentMainRunner::Create() { | 831 ContentMainRunner* ContentMainRunner::Create() { |
| 833 return new ContentMainRunnerImpl(); | 832 return new ContentMainRunnerImpl(); |
| 834 } | 833 } |
| 835 | 834 |
| 836 } // namespace content | 835 } // namespace content |
| OLD | NEW |