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

Side by Side Diff: media/audio/linux/audio_manager_linux.cc

Issue 819203002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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 unified diff | Download patch
« no previous file with comments | « media/audio/fake_audio_input_stream.cc ('k') | media/audio/win/audio_low_latency_output_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/metrics/histogram.h" 6 #include "base/metrics/histogram.h"
7 #if defined(USE_ALSA) 7 #if defined(USE_ALSA)
8 #include "media/audio/alsa/audio_manager_alsa.h" 8 #include "media/audio/alsa/audio_manager_alsa.h"
9 #else 9 #else
10 #include "media/audio/fake_audio_manager.h" 10 #include "media/audio/fake_audio_manager.h"
(...skipping 10 matching lines...) Expand all
21 21
22 enum LinuxAudioIO { 22 enum LinuxAudioIO {
23 kPulse, 23 kPulse,
24 kAlsa, 24 kAlsa,
25 kCras, 25 kCras,
26 kAudioIOMax = kCras // Must always be equal to largest logged entry. 26 kAudioIOMax = kCras // Must always be equal to largest logged entry.
27 }; 27 };
28 28
29 AudioManager* CreateAudioManager(AudioLogFactory* audio_log_factory) { 29 AudioManager* CreateAudioManager(AudioLogFactory* audio_log_factory) {
30 #if defined(USE_CRAS) 30 #if defined(USE_CRAS)
31 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseCras)) { 31 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseCras)) {
32 UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kCras, kAudioIOMax + 1); 32 UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kCras, kAudioIOMax + 1);
33 return new AudioManagerCras(audio_log_factory); 33 return new AudioManagerCras(audio_log_factory);
34 } 34 }
35 #endif 35 #endif
36 36
37 #if defined(USE_PULSEAUDIO) 37 #if defined(USE_PULSEAUDIO)
38 AudioManager* manager = AudioManagerPulse::Create(audio_log_factory); 38 AudioManager* manager = AudioManagerPulse::Create(audio_log_factory);
39 if (manager) { 39 if (manager) {
40 UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kPulse, kAudioIOMax + 1); 40 UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kPulse, kAudioIOMax + 1);
41 return manager; 41 return manager;
42 } 42 }
43 #endif 43 #endif
44 44
45 #if defined(USE_ALSA) 45 #if defined(USE_ALSA)
46 UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kAlsa, kAudioIOMax + 1); 46 UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kAlsa, kAudioIOMax + 1);
47 return new AudioManagerAlsa(audio_log_factory); 47 return new AudioManagerAlsa(audio_log_factory);
48 #else 48 #else
49 return new FakeAudioManager(audio_log_factory); 49 return new FakeAudioManager(audio_log_factory);
50 #endif 50 #endif
51 } 51 }
52 52
53 } // namespace media 53 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/fake_audio_input_stream.cc ('k') | media/audio/win/audio_low_latency_output_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698