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

Unified Diff: base/metrics/histogram.cc

Issue 601563003: Add Read/WriteSizeT() functions to the pickle layer, plus one consumer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test failure Created 6 years, 3 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 | « no previous file | base/pickle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram.cc
diff --git a/base/metrics/histogram.cc b/base/metrics/histogram.cc
index 6e30892179a7c83d60b7188d1393fba3c7c1b226..dcf771784f5aca2b391aea035b0774f7fb92deb4 100644
--- a/base/metrics/histogram.cc
+++ b/base/metrics/histogram.cc
@@ -37,13 +37,13 @@ bool ReadHistogramArguments(PickleIterator* iter,
int* flags,
int* declared_min,
int* declared_max,
- uint64* bucket_count,
+ size_t* bucket_count,
uint32* range_checksum) {
if (!iter->ReadString(histogram_name) ||
!iter->ReadInt(flags) ||
!iter->ReadInt(declared_min) ||
!iter->ReadInt(declared_max) ||
- !iter->ReadUInt64(bucket_count) ||
+ !iter->ReadSizeT(bucket_count) ||
!iter->ReadUInt32(range_checksum)) {
DLOG(ERROR) << "Pickle error decoding Histogram: " << *histogram_name;
return false;
@@ -296,7 +296,7 @@ bool Histogram::SerializeInfoImpl(Pickle* pickle) const {
pickle->WriteInt(flags()) &&
pickle->WriteInt(declared_min()) &&
pickle->WriteInt(declared_max()) &&
- pickle->WriteUInt64(bucket_count()) &&
+ pickle->WriteSizeT(bucket_count()) &&
pickle->WriteUInt32(bucket_ranges()->checksum());
}
@@ -346,7 +346,7 @@ HistogramBase* Histogram::DeserializeInfoImpl(PickleIterator* iter) {
int flags;
int declared_min;
int declared_max;
- uint64 bucket_count;
+ size_t bucket_count;
uint32 range_checksum;
if (!ReadHistogramArguments(iter, &histogram_name, &flags, &declared_min,
@@ -634,7 +634,7 @@ HistogramBase* LinearHistogram::DeserializeInfoImpl(PickleIterator* iter) {
int flags;
int declared_min;
int declared_max;
- uint64 bucket_count;
+ size_t bucket_count;
uint32 range_checksum;
if (!ReadHistogramArguments(iter, &histogram_name, &flags, &declared_min,
@@ -689,7 +689,7 @@ HistogramBase* BooleanHistogram::DeserializeInfoImpl(PickleIterator* iter) {
int flags;
int declared_min;
int declared_max;
- uint64 bucket_count;
+ size_t bucket_count;
uint32 range_checksum;
if (!ReadHistogramArguments(iter, &histogram_name, &flags, &declared_min,
@@ -784,7 +784,7 @@ HistogramBase* CustomHistogram::DeserializeInfoImpl(PickleIterator* iter) {
int flags;
int declared_min;
int declared_max;
- uint64 bucket_count;
+ size_t bucket_count;
uint32 range_checksum;
if (!ReadHistogramArguments(iter, &histogram_name, &flags, &declared_min,
« no previous file with comments | « no previous file | base/pickle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698