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