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

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: fix naming collision 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
« no previous file with comments | « 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 4b7ee5ace0a06b4dad0af8bec36f5c95b5776fc5..83648f00463da899c8634dc118b1511404dc025b 100644
--- a/media/filters/stream_parser_factory.cc
+++ b/media/filters/stream_parser_factory.cc
@@ -50,7 +50,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;
@@ -417,12 +417,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));
« no previous file with comments | « media/filters/gpu_video_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698