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

Side by Side Diff: content/renderer/media/webrtc_logging_handler_impl.cc

Issue 14329020: Implementing uploading of a WebRTC diagnostic log. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review. Created 7 years, 7 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
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698