Index: media/audio/linux/audio_manager_linux.cc |
diff --git a/media/audio/linux/audio_manager_linux.cc b/media/audio/linux/audio_manager_linux.cc |
index eaeb2f332b94d2de40143f976675828069328b4a..e7824b4d6c8d03c7904da79b480213b7d96ed07f 100644 |
--- a/media/audio/linux/audio_manager_linux.cc |
+++ b/media/audio/linux/audio_manager_linux.cc |
@@ -23,13 +23,13 @@ enum LinuxAudioIO { |
kPulse, |
kAlsa, |
kCras, |
- kAudioIOMax // Must always be last! |
+ kAudioIOMax = kCras // Must always be equal to largest logged entry. |
}; |
AudioManager* CreateAudioManager(AudioLogFactory* audio_log_factory) { |
#if defined(USE_CRAS) |
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseCras)) { |
- UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kCras, kAudioIOMax); |
+ UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kCras, kAudioIOMax + 1); |
return new AudioManagerCras(audio_log_factory); |
} |
#endif |
@@ -37,13 +37,13 @@ AudioManager* CreateAudioManager(AudioLogFactory* audio_log_factory) { |
#if defined(USE_PULSEAUDIO) |
AudioManager* manager = AudioManagerPulse::Create(audio_log_factory); |
if (manager) { |
- UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kPulse, kAudioIOMax); |
+ UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kPulse, kAudioIOMax + 1); |
return manager; |
} |
#endif |
#if defined(USE_ALSA) |
- UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kAlsa, kAudioIOMax); |
+ UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kAlsa, kAudioIOMax + 1); |
return new AudioManagerAlsa(audio_log_factory); |
#else |
return new FakeAudioManager(audio_log_factory); |