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

Unified Diff: base/metrics/histogram.cc

Issue 10829133: Fix a typo. It will cause crash when client uses a histogram with bad maximum. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram.cc
===================================================================
--- base/metrics/histogram.cc (revision 149495)
+++ base/metrics/histogram.cc (working copy)
@@ -458,12 +458,12 @@
size_t* bucket_count) {
// Defensive code for backward compatibility.
if (*minimum < 1) {
- DLOG(WARNING) << "Histogram: " << name << " Bad minimum: " << *minimum;
+ DVLOG(1) << "Histogram: " << name << " has bad minimum: " << *minimum;
*minimum = 1;
}
if (*maximum >= kSampleType_MAX) {
- DLOG(WARNING) << "Histogram: " << name << " Bad maximum: " << *maximum;
- *maximum = kSampleType_MAX;
+ DVLOG(1) << "Histogram: " << name << " has bad maximum: " << *maximum;
+ *maximum = kSampleType_MAX - 1;
}
if (*bucket_count < 3 || *bucket_count >= kBucketCount_MAX)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698