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

Unified Diff: media/filters/stream_parser_factory.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
« media/ffmpeg/ffmpeg_common.cc ('K') | « media/filters/gpu_video_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/stream_parser_factory.cc
diff --git a/media/filters/stream_parser_factory.cc b/media/filters/stream_parser_factory.cc
index 6b22f4d0f934a5d56d3e11d755bb282d66df3d80..d5ac6ff3758d6123ff8627599c5c586aa332dc3d 100644
--- a/media/filters/stream_parser_factory.cc
+++ b/media/filters/stream_parser_factory.cc
@@ -49,7 +49,7 @@ struct CodecInfo {
HISTOGRAM_EAC3,
HISTOGRAM_MP3,
HISTOGRAM_OPUS,
- HISTOGRAM_MAX // Must be the last entry.
+ HISTOGRAM_MAX = HISTOGRAM_OPUS // Must be equal to largest logged entry.
};
const char* pattern;
@@ -397,12 +397,14 @@ scoped_ptr<StreamParser> StreamParserFactory::Create(
// Log the number of codecs specified, as well as the details on each one.
UMA_HISTOGRAM_COUNTS_100("Media.MSE.NumberOfTracks", codecs.size());
for (size_t i = 0; i < audio_codecs.size(); ++i) {
- UMA_HISTOGRAM_ENUMERATION(
- "Media.MSE.AudioCodec", audio_codecs[i], CodecInfo::HISTOGRAM_MAX);
+ UMA_HISTOGRAM_ENUMERATION("Media.MSE.AudioCodec",
+ audio_codecs[i],
+ CodecInfo::HISTOGRAM_MAX + 1);
}
for (size_t i = 0; i < video_codecs.size(); ++i) {
- UMA_HISTOGRAM_ENUMERATION(
- "Media.MSE.VideoCodec", video_codecs[i], CodecInfo::HISTOGRAM_MAX);
+ UMA_HISTOGRAM_ENUMERATION("Media.MSE.VideoCodec",
+ video_codecs[i],
+ CodecInfo::HISTOGRAM_MAX + 1);
}
stream_parser.reset(factory_function(codecs, log_cb));
« media/ffmpeg/ffmpeg_common.cc ('K') | « media/filters/gpu_video_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698