| 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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 | 621 |
| 622 #if defined(OS_WIN) | 622 #if defined(OS_WIN) |
| 623 // Route stdio to parent console (if any) or create one. | 623 // Route stdio to parent console (if any) or create one. |
| 624 if (command_line.HasSwitch(switches::kEnableLogging)) | 624 if (command_line.HasSwitch(switches::kEnableLogging)) |
| 625 base::RouteStdioToConsole(); | 625 base::RouteStdioToConsole(); |
| 626 #endif | 626 #endif |
| 627 | 627 |
| 628 // Enable startup tracing asap to avoid early TRACE_EVENT calls being | 628 // Enable startup tracing asap to avoid early TRACE_EVENT calls being |
| 629 // ignored. | 629 // ignored. |
| 630 if (command_line.HasSwitch(switches::kTraceStartup)) { | 630 if (command_line.HasSwitch(switches::kTraceStartup)) { |
| 631 base::trace_event::CategoryFilter category_filter( | 631 base::trace_event::TraceConfig trace_config( |
| 632 command_line.GetSwitchValueASCII(switches::kTraceStartup)); | 632 command_line.GetSwitchValueASCII(switches::kTraceStartup), |
| 633 base::trace_event::RECORD_UNTIL_FULL); |
| 633 base::trace_event::TraceLog::GetInstance()->SetEnabled( | 634 base::trace_event::TraceLog::GetInstance()->SetEnabled( |
| 634 category_filter, | 635 trace_config, |
| 635 base::trace_event::TraceLog::RECORDING_MODE, | 636 base::trace_event::TraceLog::RECORDING_MODE); |
| 636 base::trace_event::TraceOptions( | |
| 637 base::trace_event::RECORD_UNTIL_FULL)); | |
| 638 } | 637 } |
| 639 #if defined(OS_WIN) | 638 #if defined(OS_WIN) |
| 640 // Enable exporting of events to ETW if requested on the command line. | 639 // Enable exporting of events to ETW if requested on the command line. |
| 641 if (command_line.HasSwitch(switches::kTraceExportEventsToETW)) | 640 if (command_line.HasSwitch(switches::kTraceExportEventsToETW)) |
| 642 base::trace_event::TraceEventETWExport::EnableETWExport(); | 641 base::trace_event::TraceEventETWExport::EnableETWExport(); |
| 643 #endif // OS_WIN | 642 #endif // OS_WIN |
| 644 | 643 |
| 645 #if !defined(OS_ANDROID) | 644 #if !defined(OS_ANDROID) |
| 646 // Android tracing started at the beginning of the method. | 645 // Android tracing started at the beginning of the method. |
| 647 // Other OSes have to wait till we get here in order for all the memory | 646 // Other OSes have to wait till we get here in order for all the memory |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 | 846 |
| 848 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 847 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
| 849 }; | 848 }; |
| 850 | 849 |
| 851 // static | 850 // static |
| 852 ContentMainRunner* ContentMainRunner::Create() { | 851 ContentMainRunner* ContentMainRunner::Create() { |
| 853 return new ContentMainRunnerImpl(); | 852 return new ContentMainRunnerImpl(); |
| 854 } | 853 } |
| 855 | 854 |
| 856 } // namespace content | 855 } // namespace content |
| OLD | NEW |