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

Side by Side Diff: chrome/renderer/media/mock_webrtc_logging_message_filter.cc

Issue 1123733002: [chrome/renderer/media] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nit Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/renderer/media/mock_webrtc_logging_message_filter.h" 5 #include "chrome/renderer/media/mock_webrtc_logging_message_filter.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/single_thread_task_runner.h"
9 9
10 MockWebRtcLoggingMessageFilter::MockWebRtcLoggingMessageFilter( 10 MockWebRtcLoggingMessageFilter::MockWebRtcLoggingMessageFilter(
11 const scoped_refptr<base::MessageLoopProxy>& io_message_loop) 11 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner)
12 : WebRtcLoggingMessageFilter(io_message_loop), 12 : WebRtcLoggingMessageFilter(io_task_runner),
13 logging_stopped_(false) { 13 logging_stopped_(false) {
14 } 14 }
15 15
16 MockWebRtcLoggingMessageFilter::~MockWebRtcLoggingMessageFilter() { 16 MockWebRtcLoggingMessageFilter::~MockWebRtcLoggingMessageFilter() {
17 } 17 }
18 18
19 void MockWebRtcLoggingMessageFilter::AddLogMessages( 19 void MockWebRtcLoggingMessageFilter::AddLogMessages(
20 const std::vector<WebRtcLoggingMessageData>& messages) { 20 const std::vector<WebRtcLoggingMessageData>& messages) {
21 CHECK(io_message_loop_->BelongsToCurrentThread()); 21 CHECK(io_task_runner_->BelongsToCurrentThread());
22 for (size_t i = 0; i < messages.size(); ++i) 22 for (size_t i = 0; i < messages.size(); ++i)
23 log_buffer_ += messages[i].message + "\n"; 23 log_buffer_ += messages[i].message + "\n";
24 } 24 }
25 25
26 void MockWebRtcLoggingMessageFilter::LoggingStopped() { 26 void MockWebRtcLoggingMessageFilter::LoggingStopped() {
27 CHECK(io_message_loop_->BelongsToCurrentThread()); 27 CHECK(io_task_runner_->BelongsToCurrentThread());
28 logging_stopped_ = true; 28 logging_stopped_ = true;
29 } 29 }
OLDNEW
« no previous file with comments | « chrome/renderer/media/mock_webrtc_logging_message_filter.h ('k') | chrome/renderer/media/webrtc_logging_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698