Commit a5c7bd79 authored by kaiwang@chromium.org's avatar kaiwang@chromium.org

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
parent c5aee829
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment