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

Unified Diff: chrome/common/media/webrtc_logging_message_data.h

Issue 218403004: Fix the timestamp generation for webrtc native log. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tommi's comments Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/media/webrtc_logging_message_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/media/webrtc_logging_message_data.h
diff --git a/chrome/common/media/webrtc_logging_message_data.h b/chrome/common/media/webrtc_logging_message_data.h
new file mode 100644
index 0000000000000000000000000000000000000000..4851a9766d5b4d1278cccd77006a4c8a4f72288d
--- /dev/null
+++ b/chrome/common/media/webrtc_logging_message_data.h
@@ -0,0 +1,26 @@
+// 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.
+
+#ifndef CHROME_COMMON_MEDIA_WEBRTC_LOGGING_MESSAGE_DATA_H_
+#define CHROME_COMMON_MEDIA_WEBRTC_LOGGING_MESSAGE_DATA_H_
+
+#include <string>
+
+#include "base/time/time.h"
+
+// A struct representing a logging message with its creation time.
+struct WebRtcLoggingMessageData {
+ WebRtcLoggingMessageData();
+ WebRtcLoggingMessageData(const base::Time& time, const std::string& message);
+
+ // Returns a string formatted as "[XXX:YYY] $message", where "[XXX:YYY]" is
+ // the timestamp relative to |start_time| converted to seconds (XXX) plus
+ // milliseconds (YYY).
+ std::string Format(const base::Time& start_time) const;
tommi (sloooow) - chröme 2014/04/02 17:28:46 Nice. thanks for going the extra mile.
dcheng 2014/04/02 17:52:09 Per my earlier comment, please pass base::Time by
jiayl 2014/04/02 17:59:01 Done.
+
+ base::Time timestamp;
+ std::string message;
+};
+
+#endif // CHROME_COMMON_MEDIA_WEBRTC_LOGGING_MESSAGE_DATA_H_
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/media/webrtc_logging_message_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698