| Index: chrome/common/media/webrtc_logging_message_data.cc
|
| diff --git a/chrome/common/media/webrtc_logging_message_data.cc b/chrome/common/media/webrtc_logging_message_data.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..cc940aedc78d6611ec84fd28e4dd3f06efc63a08
|
| --- /dev/null
|
| +++ b/chrome/common/media/webrtc_logging_message_data.cc
|
| @@ -0,0 +1,24 @@
|
| +// 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/common/media/webrtc_logging_message_data.h"
|
| +
|
| +#include "base/strings/stringprintf.h"
|
| +
|
| +WebRtcLoggingMessageData::WebRtcLoggingMessageData() {}
|
| +
|
| +WebRtcLoggingMessageData::WebRtcLoggingMessageData(const base::Time& time,
|
| + const std::string& message)
|
| + : timestamp(time), message(message) {}
|
| +
|
| +std::string
|
| +WebRtcLoggingMessageData::Format(const base::Time& start_time) const {
|
| + uint64 interval_ms = (timestamp - start_time).InMilliseconds();
|
| +
|
| + std::string result = base::StringPrintf("[%03ld:%03ld] %s",
|
| + interval_ms / 1000,
|
| + interval_ms % 1000,
|
| + message.c_str());
|
| + return result;
|
| +}
|
|
|