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

Unified Diff: media/base/audio_decoder_config.h

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.h
diff --git a/media/base/audio_decoder_config.h b/media/base/audio_decoder_config.h
index 77d4fc28ade49e4b77c8de3c3a3cca93686824a5..f73441b6b0e430a564f1e53ff452df3e97384675 100644
--- a/media/base/audio_decoder_config.h
+++ b/media/base/audio_decoder_config.h
@@ -18,7 +18,8 @@ namespace media {
enum AudioCodec {
// These values are histogrammed over time; do not change their ordinal
// values. When deleting a codec replace it with a dummy value; when adding a
- // codec, do so at the bottom before kAudioCodecMax.
+ // codec, do so at the bottom before kAudioCodecMax, and update the value of
+ // kAudioCodecMax to equal the new codec.
kUnknownAudioCodec = 0,
kCodecAAC = 1,
kCodecMP3 = 2,
@@ -39,8 +40,8 @@ enum AudioCodec {
// The only acceptable time to add a new codec is if there is production code
// that uses said codec in the same CL.
- // Must always be last!
- kAudioCodecMax
+ // Must always be equal to the largest entry ever logged.
+ kAudioCodecMax = kCodecPCM_ALAW,
};
// TODO(dalecurtis): FFmpeg API uses |bytes_per_channel| instead of

Powered by Google App Engine
This is Rietveld 408576698