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

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: FOO_MAX = LAST_VALID_FOO Created 6 years, 11 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..3d00de93ae9d6a0e40d65e9e10c74ab221d4f211 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 last entry!
+ kAudioCodecMax = kCodecPCM_ALAW,
};
// TODO(dalecurtis): FFmpeg API uses |bytes_per_channel| instead of

Powered by Google App Engine
This is Rietveld 408576698