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