| 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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 | 649 |
| 650 #if defined(OS_WIN) | 650 #if defined(OS_WIN) |
| 651 // Route stdio to parent console (if any) or create one. | 651 // Route stdio to parent console (if any) or create one. |
| 652 if (command_line.HasSwitch(switches::kEnableLogging)) | 652 if (command_line.HasSwitch(switches::kEnableLogging)) |
| 653 base::RouteStdioToConsole(); | 653 base::RouteStdioToConsole(); |
| 654 #endif | 654 #endif |
| 655 | 655 |
| 656 // Enable startup tracing asap to avoid early TRACE_EVENT calls being | 656 // Enable startup tracing asap to avoid early TRACE_EVENT calls being |
| 657 // ignored. | 657 // ignored. |
| 658 if (command_line.HasSwitch(switches::kTraceStartup)) { | 658 if (command_line.HasSwitch(switches::kTraceStartup)) { |
| 659 base::debug::CategoryFilter category_filter( | 659 base::trace_event::CategoryFilter category_filter( |
| 660 command_line.GetSwitchValueASCII(switches::kTraceStartup)); | 660 command_line.GetSwitchValueASCII(switches::kTraceStartup)); |
| 661 base::debug::TraceLog::GetInstance()->SetEnabled( | 661 base::trace_event::TraceLog::GetInstance()->SetEnabled( |
| 662 category_filter, | 662 category_filter, |
| 663 base::debug::TraceLog::RECORDING_MODE, | 663 base::trace_event::TraceLog::RECORDING_MODE, |
| 664 base::debug::TraceOptions( | 664 base::trace_event::TraceOptions( |
| 665 base::debug::RECORD_UNTIL_FULL)); | 665 base::trace_event::RECORD_UNTIL_FULL)); |
| 666 } | 666 } |
| 667 #if !defined(OS_ANDROID) | 667 #if !defined(OS_ANDROID) |
| 668 // Android tracing started at the beginning of the method. | 668 // Android tracing started at the beginning of the method. |
| 669 // Other OSes have to wait till we get here in order for all the memory | 669 // Other OSes have to wait till we get here in order for all the memory |
| 670 // management setup to be completed. | 670 // management setup to be completed. |
| 671 TRACE_EVENT0("startup", "ContentMainRunnerImpl::Initialize"); | 671 TRACE_EVENT0("startup", "ContentMainRunnerImpl::Initialize"); |
| 672 #endif // !OS_ANDROID | 672 #endif // !OS_ANDROID |
| 673 | 673 |
| 674 #if defined(OS_MACOSX) && !defined(OS_IOS) | 674 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 675 // We need to allocate the IO Ports before the Sandbox is initialized or | 675 // We need to allocate the IO Ports before the Sandbox is initialized or |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 | 862 |
| 863 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 863 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
| 864 }; | 864 }; |
| 865 | 865 |
| 866 // static | 866 // static |
| 867 ContentMainRunner* ContentMainRunner::Create() { | 867 ContentMainRunner* ContentMainRunner::Create() { |
| 868 return new ContentMainRunnerImpl(); | 868 return new ContentMainRunnerImpl(); |
| 869 } | 869 } |
| 870 | 870 |
| 871 } // namespace content | 871 } // namespace content |
| OLD | NEW |