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

Unified Diff: media/base/audio_decoder_config.cc

Issue 148553003: Clean up histogram'd media enum max values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years, 10 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
Index: media/base/audio_decoder_config.cc
diff --git a/media/base/audio_decoder_config.cc b/media/base/audio_decoder_config.cc
index dfaf94a2682aef4d534a441a2740fda829724845..0a8bc9b8ff6ac6ad6cf9f264375c063f7c59b3bf 100644
--- a/media/base/audio_decoder_config.cc
+++ b/media/base/audio_decoder_config.cc
@@ -48,15 +48,15 @@ void AudioDecoderConfig::Initialize(AudioCodec codec,
CHECK((extra_data_size != 0) == (extra_data != NULL));
if (record_stats) {
- UMA_HISTOGRAM_ENUMERATION("Media.AudioCodec", codec, kAudioCodecMax);
+ UMA_HISTOGRAM_ENUMERATION("Media.AudioCodec", codec, kAudioCodecMax + 1);
UMA_HISTOGRAM_ENUMERATION("Media.AudioSampleFormat", sample_format,
- kSampleFormatMax);
+ kSampleFormatMax + 1);
UMA_HISTOGRAM_ENUMERATION("Media.AudioChannelLayout", channel_layout,
- CHANNEL_LAYOUT_MAX);
- AudioSampleRate asr = media::AsAudioSampleRate(samples_per_second);
- if (asr != kUnexpectedAudioSampleRate) {
+ CHANNEL_LAYOUT_MAX + 1);
+ AudioSampleRate asr;
+ if (media::ToAudioSampleRate(samples_per_second, &asr)) {
scherkus (not reviewing) 2014/02/25 03:44:49 remove media::
UMA_HISTOGRAM_ENUMERATION("Media.AudioSamplesPerSecond", asr,
- kUnexpectedAudioSampleRate);
+ kAudioSampleRateMax + 1);
} else {
UMA_HISTOGRAM_COUNTS(
"Media.AudioSamplesPerSecondUnexpected", samples_per_second);

Powered by Google App Engine
This is Rietveld 408576698