Chromium Code Reviews| Index: content/app/content_main_runner.cc |
| diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc |
| index ee6ab17a0dc24ac400302dd074a0b2cdae168332..3bf867cd0bd6b8cc96619dc465b253f1efd30da5 100644 |
| --- a/content/app/content_main_runner.cc |
| +++ b/content/app/content_main_runner.cc |
| @@ -41,9 +41,7 @@ |
| #include "base/strings/stringprintf.h" |
| #include "base/trace_event/trace_event.h" |
| #include "build/build_config.h" |
| -#include "components/tracing/browser/trace_config_file.h" |
| -#include "components/tracing/common/trace_to_console.h" |
| -#include "components/tracing/common/tracing_switches.h" |
| +#include "components/tracing/common/trace_startup.h" |
| #include "content/app/mojo/mojo_init.h" |
| #include "content/browser/browser_main.h" |
| #include "content/browser/renderer_host/render_process_host_impl.h" |
| @@ -610,31 +608,11 @@ class ContentMainRunnerImpl : public ContentMainRunner { |
| // Enable startup tracing asap to avoid early TRACE_EVENT calls being |
| // ignored. For Android, startup tracing is enabled in an even earlier place |
| // content/app/android/library_loader_hooks.cc. |
| - if (command_line.HasSwitch(switches::kTraceStartup)) { |
| - base::trace_event::TraceConfig trace_config( |
| - command_line.GetSwitchValueASCII(switches::kTraceStartup), |
| - base::trace_event::RECORD_UNTIL_FULL); |
| - base::trace_event::TraceLog::GetInstance()->SetEnabled( |
| - trace_config, |
| - base::trace_event::TraceLog::RECORDING_MODE); |
| - } else if (command_line.HasSwitch(switches::kTraceToConsole)) { |
| - base::trace_event::TraceConfig trace_config = |
| - tracing::GetConfigForTraceToConsole(); |
| - LOG(ERROR) << "Start " << switches::kTraceToConsole |
| - << " with CategoryFilter '" |
| - << trace_config.ToCategoryFilterString() << "'."; |
| - base::trace_event::TraceLog::GetInstance()->SetEnabled( |
| - trace_config, |
| - base::trace_event::TraceLog::RECORDING_MODE); |
| - } else if (process_type != switches::kZygoteProcess && |
| - process_type != switches::kRendererProcess) { |
| - if (tracing::TraceConfigFile::GetInstance()->IsEnabled()) { |
| - // This checks kTraceConfigFile switch. |
| - base::trace_event::TraceLog::GetInstance()->SetEnabled( |
| - tracing::TraceConfigFile::GetInstance()->GetTraceConfig(), |
| - base::trace_event::TraceLog::RECORDING_MODE); |
| - } |
| - } |
| + // Zygote process does not have file thread and renderer process on Win10 |
| + // cannot access the file system. |
|
nasko
2017/02/15 19:18:58
Is that the real reason? Utility processes also do
ssid
2017/02/15 19:41:34
Um Then I would guess startup tracing does not wor
|
| + bool can_access_file_system = (process_type != switches::kZygoteProcess && |
| + process_type != switches::kRendererProcess); |
| + tracing::EnableStartupTracingIfNeeded(can_access_file_system); |
| #endif // !OS_ANDROID |
| #if defined(OS_WIN) |