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

Unified Diff: webrtc/base/ratetracker.h

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 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 | « webrtc/base/proxydetect.cc ('k') | webrtc/base/ratetracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/ratetracker.h
diff --git a/webrtc/base/ratetracker.h b/webrtc/base/ratetracker.h
index 0e2e040e888920a229a0eb2a714ab591abd1aeaf..d49d7cacdd5344f09ff38284e70bb9e32d885476 100644
--- a/webrtc/base/ratetracker.h
+++ b/webrtc/base/ratetracker.h
@@ -21,19 +21,19 @@ namespace rtc {
// that over each bucket the rate was constant.
class RateTracker {
public:
- RateTracker(uint32 bucket_milliseconds, size_t bucket_count);
+ RateTracker(uint32_t bucket_milliseconds, size_t bucket_count);
virtual ~RateTracker();
// Computes the average rate over the most recent interval_milliseconds,
// or if the first sample was added within this period, computes the rate
// since the first sample was added.
- double ComputeRateForInterval(uint32 interval_milliseconds) const;
+ double ComputeRateForInterval(uint32_t interval_milliseconds) const;
// Computes the average rate over the rate tracker's recording interval
// of bucket_milliseconds * bucket_count.
double ComputeRate() const {
- return ComputeRateForInterval(
- bucket_milliseconds_ * static_cast<uint32>(bucket_count_));
+ return ComputeRateForInterval(bucket_milliseconds_ *
+ static_cast<uint32_t>(bucket_count_));
}
// Computes the average rate since the first sample was added to the
@@ -49,19 +49,19 @@ class RateTracker {
protected:
// overrideable for tests
- virtual uint32 Time() const;
+ virtual uint32_t Time() const;
private:
void EnsureInitialized();
size_t NextBucketIndex(size_t bucket_index) const;
- const uint32 bucket_milliseconds_;
+ const uint32_t bucket_milliseconds_;
const size_t bucket_count_;
size_t* sample_buckets_;
size_t total_sample_count_;
size_t current_bucket_;
- uint32 bucket_start_time_milliseconds_;
- uint32 initialization_time_milliseconds_;
+ uint32_t bucket_start_time_milliseconds_;
+ uint32_t initialization_time_milliseconds_;
};
} // namespace rtc
« no previous file with comments | « webrtc/base/proxydetect.cc ('k') | webrtc/base/ratetracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698