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

Unified Diff: remoting/base/rate_counter.h

Issue 1542203002: Switch to standard integer types in remoting/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@int-remoting-host
Patch Set: 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
« no previous file with comments | « remoting/base/dispatch_win.h.pump ('k') | remoting/base/rate_counter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/rate_counter.h
diff --git a/remoting/base/rate_counter.h b/remoting/base/rate_counter.h
index 083ec94083348535c807d3b2df7d8d256dc7e957..ee34edc0e38c87c282885ebbf86600271f8ce463 100644
--- a/remoting/base/rate_counter.h
+++ b/remoting/base/rate_counter.h
@@ -5,10 +5,12 @@
#ifndef REMOTING_BASE_RATE_COUNTER_H_
#define REMOTING_BASE_RATE_COUNTER_H_
+#include <stdint.h>
+
#include <queue>
#include <utility>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/threading/non_thread_safe.h"
#include "base/time/time.h"
@@ -24,7 +26,7 @@ class RateCounter : public base::NonThreadSafe {
virtual ~RateCounter();
// Records a point event count to include in the rate.
- void Record(int64 value);
+ void Record(int64_t value);
// Returns the rate-per-second of values recorded over the time window.
// Note that rates reported before |time_window| has elapsed are not accurate.
@@ -35,7 +37,7 @@ class RateCounter : public base::NonThreadSafe {
private:
// Type used to store data points with timestamps.
- typedef std::pair<base::Time, int64> DataPoint;
+ typedef std::pair<base::Time, int64_t> DataPoint;
// Removes data points more than |time_window| older than |current_time|.
void EvictOldDataPoints(base::Time current_time);
@@ -50,7 +52,7 @@ class RateCounter : public base::NonThreadSafe {
std::queue<DataPoint> data_points_;
// Sum of values in |data_points_|.
- int64 sum_;
+ int64_t sum_;
// If set, used to calculate the running average, in place of Now().
base::Time current_time_for_test_;
« no previous file with comments | « remoting/base/dispatch_win.h.pump ('k') | remoting/base/rate_counter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698