| 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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 | 633 |
| 634 #if defined(OS_WIN) | 634 #if defined(OS_WIN) |
| 635 // Route stdio to parent console (if any) or create one. | 635 // Route stdio to parent console (if any) or create one. |
| 636 if (command_line.HasSwitch(switches::kEnableLogging)) | 636 if (command_line.HasSwitch(switches::kEnableLogging)) |
| 637 base::RouteStdioToConsole(); | 637 base::RouteStdioToConsole(); |
| 638 #endif | 638 #endif |
| 639 | 639 |
| 640 // Enable startup tracing asap to avoid early TRACE_EVENT calls being | 640 // Enable startup tracing asap to avoid early TRACE_EVENT calls being |
| 641 // ignored. | 641 // ignored. |
| 642 if (command_line.HasSwitch(switches::kTraceStartup)) { | 642 if (command_line.HasSwitch(switches::kTraceStartup)) { |
| 643 base::debug::CategoryFilter category_filter( |
| 644 command_line.GetSwitchValueASCII(switches::kTraceStartup)); |
| 643 base::debug::TraceLog::GetInstance()->SetEnabled( | 645 base::debug::TraceLog::GetInstance()->SetEnabled( |
| 644 command_line.GetSwitchValueASCII(switches::kTraceStartup), | 646 category_filter, |
| 645 base::debug::TraceLog::RECORD_UNTIL_FULL); | 647 base::debug::TraceLog::RECORD_UNTIL_FULL); |
| 646 } | 648 } |
| 647 | 649 |
| 648 #if defined(OS_MACOSX) && !defined(OS_IOS) | 650 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 649 // We need to allocate the IO Ports before the Sandbox is initialized or | 651 // We need to allocate the IO Ports before the Sandbox is initialized or |
| 650 // the first instance of SystemMonitor is created. | 652 // the first instance of SystemMonitor is created. |
| 651 // It's important not to allocate the ports for processes which don't | 653 // It's important not to allocate the ports for processes which don't |
| 652 // register with the system monitor - see crbug.com/88867. | 654 // register with the system monitor - see crbug.com/88867. |
| 653 if (process_type.empty() || | 655 if (process_type.empty() || |
| 654 process_type == switches::kPluginProcess || | 656 process_type == switches::kPluginProcess || |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 | 820 |
| 819 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 821 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
| 820 }; | 822 }; |
| 821 | 823 |
| 822 // static | 824 // static |
| 823 ContentMainRunner* ContentMainRunner::Create() { | 825 ContentMainRunner* ContentMainRunner::Create() { |
| 824 return new ContentMainRunnerImpl(); | 826 return new ContentMainRunnerImpl(); |
| 825 } | 827 } |
| 826 | 828 |
| 827 } // namespace content | 829 } // namespace content |
| OLD | NEW |