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

Side by Side Diff: chrome/common/media/webrtc_logging_message_data.cc

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/common/media/webrtc_logging_message_data.h" 5 #include "chrome/common/media/webrtc_logging_message_data.h"
6 6
7 #include <stdint.h>
8
7 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
8 10
9 WebRtcLoggingMessageData::WebRtcLoggingMessageData() {} 11 WebRtcLoggingMessageData::WebRtcLoggingMessageData() {}
10 12
11 WebRtcLoggingMessageData::WebRtcLoggingMessageData(base::Time time, 13 WebRtcLoggingMessageData::WebRtcLoggingMessageData(base::Time time,
12 const std::string& message) 14 const std::string& message)
13 : timestamp(time), message(message) {} 15 : timestamp(time), message(message) {}
14 16
15 // static 17 // static
16 std::string WebRtcLoggingMessageData::Format(const std::string& message, 18 std::string WebRtcLoggingMessageData::Format(const std::string& message,
17 base::Time timestamp, 19 base::Time timestamp,
18 base::Time start_time) { 20 base::Time start_time) {
19 int32 interval_ms = 21 int32_t interval_ms =
20 static_cast<int32>((timestamp - start_time).InMilliseconds()); 22 static_cast<int32_t>((timestamp - start_time).InMilliseconds());
21 return base::StringPrintf("[%03d:%03d] %s", interval_ms / 1000, 23 return base::StringPrintf("[%03d:%03d] %s", interval_ms / 1000,
22 interval_ms % 1000, message.c_str()); 24 interval_ms % 1000, message.c_str());
23 } 25 }
24 26
25 std::string WebRtcLoggingMessageData::Format(base::Time start_time) const { 27 std::string WebRtcLoggingMessageData::Format(base::Time start_time) const {
26 return Format(message, timestamp, start_time); 28 return Format(message, timestamp, start_time);
27 } 29 }
OLDNEW
« no previous file with comments | « chrome/common/media/media_resource_provider.cc ('k') | chrome/common/media_galleries/iphoto_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698