diff options
author | isherman <isherman@chromium.org> | 2014-08-28 00:21:52 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-28 07:23:22 +0000 |
commit | bed49a668bf2d496416ae7346d7d3a1f42e44260 (patch) | |
tree | 3ba4353a9187d679fb33710b6f6afccbd0a9aeef /base | |
parent | bd05f75db5f6982fe489b5264e5c1b53629d9b4b (diff) | |
download | chromium_src-bed49a668bf2d496416ae7346d7d3a1f42e44260.zip chromium_src-bed49a668bf2d496416ae7346d7d3a1f42e44260.tar.gz chromium_src-bed49a668bf2d496416ae7346d7d3a1f42e44260.tar.bz2 |
Use precisely sized integer types in histograms code.
BUG=none
TEST=none
R=asvitkine@chromium.org
Review URL: https://codereview.chromium.org/511903003
Cr-Commit-Position: refs/heads/master@{#292340}
Diffstat (limited to 'base')
-rw-r--r-- | base/metrics/histogram_base.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/base/metrics/histogram_base.h b/base/metrics/histogram_base.h index be07fc6..c24df24 100644 --- a/base/metrics/histogram_base.h +++ b/base/metrics/histogram_base.h @@ -5,6 +5,8 @@ #ifndef BASE_METRICS_HISTOGRAM_BASE_H_ #define BASE_METRICS_HISTOGRAM_BASE_H_ +#include <stdint.h> + #include <string> #include <vector> @@ -49,9 +51,9 @@ BASE_EXPORT_PRIVATE HistogramBase* DeserializeHistogramInfo( class BASE_EXPORT HistogramBase { public: - typedef int Sample; // Used for samples. + typedef int32_t Sample; // Used for samples. typedef subtle::Atomic32 AtomicCount; // Used to count samples. - typedef int32 Count; // Used to manipulate counts in temporaries. + typedef int32_t Count; // Used to manipulate counts in temporaries. static const Sample kSampleType_MAX; // INT_MAX @@ -99,9 +101,9 @@ class BASE_EXPORT HistogramBase { void CheckName(const StringPiece& name) const; // Operations with Flags enum. - int32 flags() const { return flags_; } - void SetFlags(int32 flags); - void ClearFlags(int32 flags); + int32_t flags() const { return flags_; } + void SetFlags(int32_t flags); + void ClearFlags(int32_t flags); virtual HistogramType GetHistogramType() const = 0; @@ -173,7 +175,7 @@ class BASE_EXPORT HistogramBase { private: const std::string histogram_name_; - int32 flags_; + int32_t flags_; DISALLOW_COPY_AND_ASSIGN(HistogramBase); }; |