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

Unified Diff: base/metrics/bucket_ranges.h

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too 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 | « base/message_loop/message_pump_win.cc ('k') | base/metrics/bucket_ranges.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/bucket_ranges.h
diff --git a/base/metrics/bucket_ranges.h b/base/metrics/bucket_ranges.h
index eb330f4f0c548b23137eb29bbda240d297521c59..c356195ba78ca2716897463b576f73a26bbe9b70 100644
--- a/base/metrics/bucket_ranges.h
+++ b/base/metrics/bucket_ranges.h
@@ -17,10 +17,15 @@
#ifndef BASE_METRICS_BUCKET_RANGES_H_
#define BASE_METRICS_BUCKET_RANGES_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <vector>
+#include <limits.h>
+
#include "base/base_export.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/metrics/histogram_base.h"
namespace base {
@@ -35,8 +40,8 @@ class BASE_EXPORT BucketRanges {
size_t size() const { return ranges_.size(); }
HistogramBase::Sample range(size_t i) const { return ranges_[i]; }
void set_range(size_t i, HistogramBase::Sample value);
- uint32 checksum() const { return checksum_; }
- void set_checksum(uint32 checksum) { checksum_ = checksum; }
+ uint32_t checksum() const { return checksum_; }
+ void set_checksum(uint32_t checksum) { checksum_ = checksum; }
// A bucket is defined by a consecutive pair of entries in |ranges|, so there
// is one fewer bucket than there are ranges. For example, if |ranges| is
@@ -46,7 +51,7 @@ class BASE_EXPORT BucketRanges {
// Checksum methods to verify whether the ranges are corrupted (e.g. bad
// memory access).
- uint32 CalculateChecksum() const;
+ uint32_t CalculateChecksum() const;
bool HasValidChecksum() const;
void ResetChecksum();
@@ -62,16 +67,16 @@ class BASE_EXPORT BucketRanges {
// Checksum for the conntents of ranges_. Used to detect random over-writes
// of our data, and to quickly see if some other BucketRanges instance is
// possibly Equal() to this instance.
- // TODO(kaiwang): Consider change this to uint64. Because we see a lot of
+ // TODO(kaiwang): Consider change this to uint64_t. Because we see a lot of
// noise on UMA dashboard.
- uint32 checksum_;
+ uint32_t checksum_;
DISALLOW_COPY_AND_ASSIGN(BucketRanges);
};
//////////////////////////////////////////////////////////////////////////////
// Expose only for test.
-BASE_EXPORT extern const uint32 kCrcTable[256];
+BASE_EXPORT extern const uint32_t kCrcTable[256];
} // namespace base
« no previous file with comments | « base/message_loop/message_pump_win.cc ('k') | base/metrics/bucket_ranges.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698