OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/renderer/media/webrtc_logging_handler_impl.h" | 5 #include "content/renderer/media/webrtc_logging_handler_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 #include "content/common/partial_circular_buffer.h" | 9 #include "base/partial_circular_buffer.h" |
10 #include "content/renderer/media/webrtc_logging_message_filter.h" | 10 #include "content/renderer/media/webrtc_logging_message_filter.h" |
11 #include "third_party/libjingle/overrides/talk/base/logging.h" | 11 #include "third_party/libjingle/overrides/talk/base/logging.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 WebRtcLoggingHandlerImpl::WebRtcLoggingHandlerImpl( | 15 WebRtcLoggingHandlerImpl::WebRtcLoggingHandlerImpl( |
16 const scoped_refptr<base::MessageLoopProxy>& io_message_loop) | 16 const scoped_refptr<base::MessageLoopProxy>& io_message_loop) |
17 : io_message_loop_(io_message_loop) { | 17 : io_message_loop_(io_message_loop) { |
18 } | 18 } |
19 | 19 |
(...skipping 21 matching lines...) Expand all Loading... | |
41 } | 41 } |
42 | 42 |
43 void WebRtcLoggingHandlerImpl::OnLogOpened( | 43 void WebRtcLoggingHandlerImpl::OnLogOpened( |
44 base::SharedMemoryHandle handle, | 44 base::SharedMemoryHandle handle, |
45 uint32 length) { | 45 uint32 length) { |
46 DCHECK(CalledOnValidThread()); | 46 DCHECK(CalledOnValidThread()); |
47 | 47 |
48 shared_memory_.reset(new base::SharedMemory(handle, false)); | 48 shared_memory_.reset(new base::SharedMemory(handle, false)); |
49 CHECK(shared_memory_->Map(length)); | 49 CHECK(shared_memory_->Map(length)); |
50 circular_buffer_.reset( | 50 circular_buffer_.reset( |
51 new content::PartialCircularBuffer(shared_memory_->memory(), | 51 new base::PartialCircularBuffer(shared_memory_->memory(), |
52 length, | 52 length, |
vabr (Chromium)
2013/05/13 08:55:50
Please correct indentation.
Henrik Grunell
2013/05/14 13:48:50
Done.
| |
53 length / 2)); | 53 length / 2)); |
54 | 54 |
55 talk_base::InitDiagnosticLoggingDelegate(this); | 55 talk_base::InitDiagnosticLoggingDelegate(this); |
56 } | 56 } |
57 | 57 |
58 void WebRtcLoggingHandlerImpl::OnOpenLogFailed() { | 58 void WebRtcLoggingHandlerImpl::OnOpenLogFailed() { |
59 DCHECK(CalledOnValidThread()); | 59 DCHECK(CalledOnValidThread()); |
60 DLOG(ERROR) << "Could not open log."; | 60 DLOG(ERROR) << "Could not open log."; |
61 // TODO(grunell): Implement. | 61 // TODO(grunell): Implement. |
62 NOTIMPLEMENTED(); | 62 NOTIMPLEMENTED(); |
63 } | 63 } |
64 | 64 |
65 } // namespace content | 65 } // namespace content |
OLD | NEW |