Index: content/renderer/render_thread_impl.cc |
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
index 32109c0d41ac8dfc4a4456a06aad7e015f458788..bf1352dcf572796bd7ea1b817764bb86f753c26e 100644 |
--- a/content/renderer/render_thread_impl.cc |
+++ b/content/renderer/render_thread_impl.cc |
@@ -10,6 +10,7 @@ |
#include <vector> |
#include "base/allocator/allocator_extension.h" |
+#include "base/base_switches.h" |
#include "base/command_line.h" |
#include "base/debug/trace_event.h" |
#include "base/lazy_instance.h" |
@@ -397,6 +398,19 @@ void RenderThreadImpl::Init() { |
RegisterExtension(SkiaBenchmarkingExtension::Get()); |
} |
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTraceToConsole)) { |
piman
2013/07/03 17:42:28
Could we move this to ChildThread, so that it appl
Ian Vollick
2013/07/03 18:48:03
That's a great idea. Done.
|
+ std::string category_string = |
+ CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
+ switches::kTraceToConsole); |
+ |
+ if (!category_string.size()) |
+ category_string = "*"; |
+ |
+ base::debug::TraceLog::GetInstance()->SetEnabled( |
+ base::debug::CategoryFilter(category_string), |
+ base::debug::TraceLog::ECHO_TO_CONSOLE); |
+ } |
+ |
context_lost_cb_.reset(new GpuVDAContextLostCallback()); |
// Note that under Linux, the media library will normally already have |