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

Side by Side Diff: media/audio/audio_output_device.h

Issue 2121223002: AudioOutputDevice authorization timeout UMA histograms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timeout set to 2000, UMA stat added. Created 4 years, 5 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
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 // Audio rendering unit utilizing audio output stream provided by browser 5 // Audio rendering unit utilizing audio output stream provided by browser
6 // process through IPC. 6 // process through IPC.
7 // 7 //
8 // Relationship of classes. 8 // Relationship of classes.
9 // 9 //
10 // AudioOutputController AudioOutputDevice 10 // AudioOutputController AudioOutputDevice
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_ 62 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_
63 #define MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_ 63 #define MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_
64 64
65 #include <memory> 65 #include <memory>
66 #include <string> 66 #include <string>
67 67
68 #include "base/bind.h" 68 #include "base/bind.h"
69 #include "base/macros.h" 69 #include "base/macros.h"
70 #include "base/memory/shared_memory.h" 70 #include "base/memory/shared_memory.h"
71 #include "base/synchronization/waitable_event.h" 71 #include "base/synchronization/waitable_event.h"
72 #include "base/time/time.h"
72 #include "media/audio/audio_device_thread.h" 73 #include "media/audio/audio_device_thread.h"
73 #include "media/audio/audio_output_ipc.h" 74 #include "media/audio/audio_output_ipc.h"
74 #include "media/audio/scoped_task_runner_observer.h" 75 #include "media/audio/scoped_task_runner_observer.h"
75 #include "media/base/audio_parameters.h" 76 #include "media/base/audio_parameters.h"
76 #include "media/base/audio_renderer_sink.h" 77 #include "media/base/audio_renderer_sink.h"
77 #include "media/base/media_export.h" 78 #include "media/base/media_export.h"
78 #include "media/base/output_device_info.h" 79 #include "media/base/output_device_info.h"
79 80
80 namespace base { 81 namespace base {
82 class ElapsedTimer;
81 class OneShotTimer; 83 class OneShotTimer;
82 } 84 }
83 85
84 namespace media { 86 namespace media {
85 87
86 class MEDIA_EXPORT AudioOutputDevice 88 class MEDIA_EXPORT AudioOutputDevice
87 : NON_EXPORTED_BASE(public AudioRendererSink), 89 : NON_EXPORTED_BASE(public AudioRendererSink),
88 NON_EXPORTED_BASE(public AudioOutputIPCDelegate), 90 NON_EXPORTED_BASE(public AudioOutputIPCDelegate),
89 NON_EXPORTED_BASE(public ScopedTaskRunnerObserver) { 91 NON_EXPORTED_BASE(public ScopedTaskRunnerObserver) {
90 public: 92 public:
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // the callback via Start(). See http://crbug.com/151051 for details. 212 // the callback via Start(). See http://crbug.com/151051 for details.
211 bool stopping_hack_; 213 bool stopping_hack_;
212 214
213 base::WaitableEvent did_receive_auth_; 215 base::WaitableEvent did_receive_auth_;
214 AudioParameters output_params_; 216 AudioParameters output_params_;
215 OutputDeviceStatus device_status_; 217 OutputDeviceStatus device_status_;
216 218
217 const base::TimeDelta auth_timeout_; 219 const base::TimeDelta auth_timeout_;
218 std::unique_ptr<base::OneShotTimer> auth_timeout_action_; 220 std::unique_ptr<base::OneShotTimer> auth_timeout_action_;
219 221
222 // Tracks how long it takes to get authorization response.
223 std::unique_ptr<base::ElapsedTimer> auth_timer_;
224
220 DISALLOW_COPY_AND_ASSIGN(AudioOutputDevice); 225 DISALLOW_COPY_AND_ASSIGN(AudioOutputDevice);
221 }; 226 };
222 227
223 } // namespace media 228 } // namespace media
224 229
225 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_ 230 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698