OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_COMMON_MEDIA_WEBRTC_LOGGING_MESSAGE_DATA_H_ |
| 6 #define CHROME_COMMON_MEDIA_WEBRTC_LOGGING_MESSAGE_DATA_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/time/time.h" |
| 11 |
| 12 // A struct representing a logging message with its creation time. |
| 13 struct WebRtcLoggingMessageData { |
| 14 WebRtcLoggingMessageData(); |
| 15 WebRtcLoggingMessageData(base::Time time, const std::string& message); |
| 16 |
| 17 // Returns a string formatted as "[XXX:YYY] $message", where "[XXX:YYY]" is |
| 18 // the timestamp relative to |start_time| converted to seconds (XXX) plus |
| 19 // milliseconds (YYY). |
| 20 std::string Format(base::Time start_time) const; |
| 21 |
| 22 base::Time timestamp; |
| 23 std::string message; |
| 24 }; |
| 25 |
| 26 #endif // CHROME_COMMON_MEDIA_WEBRTC_LOGGING_MESSAGE_DATA_H_ |
OLD | NEW |