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

Unified Diff: media/cast/logging/stats_event_subscriber.cc

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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
Index: media/cast/logging/stats_event_subscriber.cc
diff --git a/media/cast/logging/stats_event_subscriber.cc b/media/cast/logging/stats_event_subscriber.cc
index a254e634a8b1adba99e0eb3794b975ab20de88e6..ff5e6f8ddd86f6a6d94da860976b4180e4b6c042 100644
--- a/media/cast/logging/stats_event_subscriber.cc
+++ b/media/cast/logging/stats_event_subscriber.cc
@@ -35,9 +35,9 @@ bool IsReceiverEvent(CastLoggingEvent event) {
} // namespace
-StatsEventSubscriber::SimpleHistogram::SimpleHistogram(int64 min,
- int64 max,
- int64 width)
+StatsEventSubscriber::SimpleHistogram::SimpleHistogram(int64_t min,
+ int64_t max,
+ int64_t width)
: min_(min), max_(max), width_(width), buckets_((max - min) / width + 2) {
CHECK_GT(buckets_.size(), 2u);
CHECK_EQ(0, (max_ - min_) % width_);
@@ -46,7 +46,7 @@ StatsEventSubscriber::SimpleHistogram::SimpleHistogram(int64 min,
StatsEventSubscriber::SimpleHistogram::~SimpleHistogram() {
}
-void StatsEventSubscriber::SimpleHistogram::Add(int64 sample) {
+void StatsEventSubscriber::SimpleHistogram::Add(int64_t sample) {
if (sample < min_) {
++buckets_.front();
} else if (sample >= max_) {
@@ -78,8 +78,8 @@ StatsEventSubscriber::SimpleHistogram::GetHistogram() const {
if (!buckets_[i])
continue;
bucket.reset(new base::DictionaryValue);
- int64 lower = min_ + (i - 1) * width_;
- int64 upper = lower + width_ - 1;
+ int64_t lower = min_ + (i - 1) * width_;
+ int64_t upper = lower + width_ - 1;
bucket->SetInteger(
base::StringPrintf("%" PRId64 "-%" PRId64, lower, upper),
buckets_[i]);
@@ -596,7 +596,7 @@ void StatsEventSubscriber::UpdateLastResponseTime(
void StatsEventSubscriber::ErasePacketSentTime(
const PacketEvent& packet_event) {
- std::pair<RtpTimestamp, uint16> key(
+ std::pair<RtpTimestamp, uint16_t> key(
std::make_pair(packet_event.rtp_timestamp, packet_event.packet_id));
packet_sent_times_.erase(key);
}
@@ -622,7 +622,7 @@ void StatsEventSubscriber::RecordPacketRelatedLatencies(
if (!GetReceiverOffset(&receiver_offset))
return;
- std::pair<RtpTimestamp, uint16> key(
+ std::pair<RtpTimestamp, uint16_t> key(
std::make_pair(packet_event.rtp_timestamp, packet_event.packet_id));
PacketEventTimeMap::iterator it = packet_sent_times_.find(key);
if (it == packet_sent_times_.end()) {

Powered by Google App Engine
This is Rietveld 408576698