Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Unified Diff: content/app/content_main_runner.cc

Issue 10832309: Make printf and LOG output to cmd console for Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wez feedback Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process_util_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/app/content_main_runner.cc
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 58dc14b2bc0dc7e8f8df1a49d545598071899aee..4d76ab1f5170d86e479d12bfb8e9bd007a88ab05 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -530,6 +530,12 @@ static void ReleaseFreeMemoryThunk() {
SetContentClient(&empty_content_client_);
ContentClientInitializer::Set(process_type, delegate_);
+#if defined(OS_WIN)
+ // Route stdio to parent console (if any) or create one.
+ if (command_line.HasSwitch(switches::kEnableLogging))
+ base::RouteStdioToConsole();
+#endif
+
// Enable startup tracing asap to avoid early TRACE_EVENT calls being
// ignored.
if (command_line.HasSwitch(switches::kTraceStartup)) {
« no previous file with comments | « base/process_util_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698