| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "allocator_shim/allocator_stub.h" | 5 #include "allocator_shim/allocator_stub.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "init_webrtc.h" | 9 #include "init_webrtc.h" |
| 10 #include "talk/base/basictypes.h" | 10 #include "talk/base/basictypes.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 *create_media_engine = &CreateWebRtcMediaEngine; | 61 *create_media_engine = &CreateWebRtcMediaEngine; |
| 62 *destroy_media_engine = &DestroyWebRtcMediaEngine; | 62 *destroy_media_engine = &DestroyWebRtcMediaEngine; |
| 63 | 63 |
| 64 if (CommandLine::Init(0, NULL)) { | 64 if (CommandLine::Init(0, NULL)) { |
| 65 #if !defined(OS_WIN) | 65 #if !defined(OS_WIN) |
| 66 // This is not needed on Windows since CommandLine::Init has already | 66 // This is not needed on Windows since CommandLine::Init has already |
| 67 // done the equivalent thing via the GetCommandLine() API. | 67 // done the equivalent thing via the GetCommandLine() API. |
| 68 CommandLine::ForCurrentProcess()->AppendArguments(command_line, true); | 68 CommandLine::ForCurrentProcess()->AppendArguments(command_line, true); |
| 69 #endif | 69 #endif |
| 70 logging::InitLogging( | 70 logging::LoggingSettings settings; |
| 71 NULL, | 71 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
| 72 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, | 72 logging::InitLogging(settings); |
| 73 logging::LOCK_LOG_FILE, | |
| 74 logging::DELETE_OLD_LOG_FILE, | |
| 75 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | |
| 76 | 73 |
| 77 // Override the log message handler to forward logs to chrome's handler. | 74 // Override the log message handler to forward logs to chrome's handler. |
| 78 logging::SetLogMessageHandler(log_handler); | 75 logging::SetLogMessageHandler(log_handler); |
| 79 webrtc::SetupEventTracer(trace_get_category_enabled, | 76 webrtc::SetupEventTracer(trace_get_category_enabled, |
| 80 trace_add_trace_event); | 77 trace_add_trace_event); |
| 81 } | 78 } |
| 82 | 79 |
| 83 return true; | 80 return true; |
| 84 } | 81 } |
| 85 } // extern "C" | 82 } // extern "C" |
| OLD | NEW |