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

Unified Diff: webrtc/modules/audio_device/audio_device_generic.h

Issue 2103863004: UMA log for audio_device Init and Start(Playout|Recording). Make Init return a more specific error … (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rename variable. Created 4 years, 6 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: webrtc/modules/audio_device/audio_device_generic.h
diff --git a/webrtc/modules/audio_device/audio_device_generic.h b/webrtc/modules/audio_device/audio_device_generic.h
index c76ea52428ad932a9a16b80abe0b0e1fc1b95dbb..326d933bcc3301e60ce19867e7136d0ce9353c4c 100644
--- a/webrtc/modules/audio_device/audio_device_generic.h
+++ b/webrtc/modules/audio_device/audio_device_generic.h
@@ -18,12 +18,22 @@ namespace webrtc {
class AudioDeviceGeneric {
public:
+ // For use with UMA logging. Must be kept in sync with histograms.xml in
+ // Chrome, located at
+ // https://cs.chromium.org/chromium/src/tools/metrics/histograms/histograms.xml
+ enum class InitStatus {
+ OK = 0,
+ PLAYOUT_ERROR = 1,
+ RECORDING_ERROR = 2,
+ OTHER_ERROR = 3,
+ NUM_STATUSES = 4
+ };
// Retrieve the currently utilized audio layer
virtual int32_t ActiveAudioLayer(
AudioDeviceModule::AudioLayer& audioLayer) const = 0;
// Main initializaton and termination
- virtual int32_t Init() = 0;
+ virtual InitStatus Init() = 0;
virtual int32_t Terminate() = 0;
virtual bool Initialized() const = 0;

Powered by Google App Engine
This is Rietveld 408576698