summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorkaiwang@chromium.org <kaiwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-02 00:29:04 +0000
committerkaiwang@chromium.org <kaiwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-02 00:29:04 +0000
commita5c7bd7906cd7fda3b95dce6f96708361ac0b0b7 (patch)
treeb045b74bc6779db8f3e24460a93f353c7de8ec3a /base
parentc5aee829d059e260b518a2229fdfed6359ec8f46 (diff)
downloadchromium_src-a5c7bd7906cd7fda3b95dce6f96708361ac0b0b7.zip
chromium_src-a5c7bd7906cd7fda3b95dce6f96708361ac0b0b7.tar.gz
chromium_src-a5c7bd7906cd7fda3b95dce6f96708361ac0b0b7.tar.bz2
Fix a typo. It will cause crash when client uses a histogram with bad maximum.
BUG=140145 Review URL: https://chromiumcodereview.appspot.com/10829133 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149541 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/metrics/histogram.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/base/metrics/histogram.cc b/base/metrics/histogram.cc
index 40f5c6d..4087ad7 100644
--- a/base/metrics/histogram.cc
+++ b/base/metrics/histogram.cc
@@ -458,12 +458,12 @@ bool Histogram::InspectConstructionArguments(const string& name,
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)