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

Side by Side 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: compile 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 unified diff | Download patch | Annotate | Revision Log
« base/process_util_win.cc ('K') | « base/process_util_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 completed_basic_startup_ = true; 523 completed_basic_startup_ = true;
524 524
525 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 525 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
526 std::string process_type = 526 std::string process_type =
527 command_line.GetSwitchValueASCII(switches::kProcessType); 527 command_line.GetSwitchValueASCII(switches::kProcessType);
528 528
529 if (!GetContentClient()) 529 if (!GetContentClient())
530 SetContentClient(&empty_content_client_); 530 SetContentClient(&empty_content_client_);
531 ContentClientInitializer::Set(process_type, delegate_); 531 ContentClientInitializer::Set(process_type, delegate_);
532 532
533 #if defined(OS_WIN)
534 // Route stdio to parent console (if any) or create one.
535 if (command_line.HasSwitch(switches::kEnableLogging))
536 base::RouteStdioToConsole();
537 #endif
538
533 // Enable startup tracing asap to avoid early TRACE_EVENT calls being 539 // Enable startup tracing asap to avoid early TRACE_EVENT calls being
534 // ignored. 540 // ignored.
535 if (command_line.HasSwitch(switches::kTraceStartup)) { 541 if (command_line.HasSwitch(switches::kTraceStartup)) {
536 base::debug::TraceLog::GetInstance()->SetEnabled( 542 base::debug::TraceLog::GetInstance()->SetEnabled(
537 command_line.GetSwitchValueASCII(switches::kTraceStartup)); 543 command_line.GetSwitchValueASCII(switches::kTraceStartup));
538 } 544 }
539 545
540 #if defined(OS_MACOSX) 546 #if defined(OS_MACOSX)
541 // We need to allocate the IO Ports before the Sandbox is initialized or 547 // We need to allocate the IO Ports before the Sandbox is initialized or
542 // the first instance of SystemMonitor is created. 548 // the first instance of SystemMonitor is created.
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 709
704 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 710 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
705 }; 711 };
706 712
707 // static 713 // static
708 ContentMainRunner* ContentMainRunner::Create() { 714 ContentMainRunner* ContentMainRunner::Create() {
709 return new ContentMainRunnerImpl(); 715 return new ContentMainRunnerImpl();
710 } 716 }
711 717
712 } // namespace content 718 } // namespace content
OLDNEW
« base/process_util_win.cc ('K') | « base/process_util_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698