| 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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 | 609 |
| 610 #if defined(OS_WIN) | 610 #if defined(OS_WIN) |
| 611 // Route stdio to parent console (if any) or create one. | 611 // Route stdio to parent console (if any) or create one. |
| 612 if (command_line.HasSwitch(switches::kEnableLogging)) | 612 if (command_line.HasSwitch(switches::kEnableLogging)) |
| 613 base::RouteStdioToConsole(); | 613 base::RouteStdioToConsole(); |
| 614 #endif | 614 #endif |
| 615 | 615 |
| 616 // Enable startup tracing asap to avoid early TRACE_EVENT calls being | 616 // Enable startup tracing asap to avoid early TRACE_EVENT calls being |
| 617 // ignored. | 617 // ignored. |
| 618 if (command_line.HasSwitch(switches::kTraceStartup)) { | 618 if (command_line.HasSwitch(switches::kTraceStartup)) { |
| 619 base::debug::CategoryFilter category_filter( |
| 620 command_line.GetSwitchValueASCII(switches::kTraceStartup)); |
| 619 base::debug::TraceLog::GetInstance()->SetEnabled( | 621 base::debug::TraceLog::GetInstance()->SetEnabled( |
| 620 command_line.GetSwitchValueASCII(switches::kTraceStartup), | 622 category_filter, |
| 621 base::debug::TraceLog::RECORD_UNTIL_FULL); | 623 base::debug::TraceLog::RECORD_UNTIL_FULL); |
| 622 } | 624 } |
| 623 | 625 |
| 624 #if defined(OS_MACOSX) && !defined(OS_IOS) | 626 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 625 // We need to allocate the IO Ports before the Sandbox is initialized or | 627 // We need to allocate the IO Ports before the Sandbox is initialized or |
| 626 // the first instance of PowerMonitor is created. | 628 // the first instance of PowerMonitor is created. |
| 627 // It's important not to allocate the ports for processes which don't | 629 // It's important not to allocate the ports for processes which don't |
| 628 // register with the power monitor - see crbug.com/88867. | 630 // register with the power monitor - see crbug.com/88867. |
| 629 if (process_type.empty() || | 631 if (process_type.empty() || |
| 630 process_type == switches::kPluginProcess || | 632 process_type == switches::kPluginProcess || |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 | 796 |
| 795 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 797 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
| 796 }; | 798 }; |
| 797 | 799 |
| 798 // static | 800 // static |
| 799 ContentMainRunner* ContentMainRunner::Create() { | 801 ContentMainRunner* ContentMainRunner::Create() { |
| 800 return new ContentMainRunnerImpl(); | 802 return new ContentMainRunnerImpl(); |
| 801 } | 803 } |
| 802 | 804 |
| 803 } // namespace content | 805 } // namespace content |
| OLD | NEW |