root/chrome/renderer/media/mock_webrtc_logging_message_filter.cc

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. logging_stopped_
  2. AddLogMessages
  3. LoggingStopped

// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/renderer/media/mock_webrtc_logging_message_filter.h"

#include "base/logging.h"

MockWebRtcLoggingMessageFilter::MockWebRtcLoggingMessageFilter(
    const scoped_refptr<base::MessageLoopProxy>& io_message_loop)
    : WebRtcLoggingMessageFilter(io_message_loop),
      logging_stopped_(false) {
}

MockWebRtcLoggingMessageFilter::~MockWebRtcLoggingMessageFilter() {
}

void MockWebRtcLoggingMessageFilter::AddLogMessages(
    const std::vector<WebRtcLoggingMessageData>& messages) {
  CHECK(io_message_loop_->BelongsToCurrentThread());
  for (size_t i = 0; i < messages.size(); ++i)
    log_buffer_ += messages[i].message + "\n";
}

void MockWebRtcLoggingMessageFilter::LoggingStopped() {
  CHECK(io_message_loop_->BelongsToCurrentThread());
  logging_stopped_ = true;
}

/* [<][>][^][v][top][bottom][index][help] */