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

Unified Diff: media/audio/audio_manager.h

Issue 1105083004: Switch audio hang monitor to default-off. Enable for non-beta,stable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 8 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
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | media/audio/audio_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager.h
diff --git a/media/audio/audio_manager.h b/media/audio/audio_manager.h
index 5da521dcca33de4e76b0006cf64fefa39940bca0..1391742fe5f68a83e08da7e0aa3f052c22e5f4a9 100644
--- a/media/audio/audio_manager.h
+++ b/media/audio/audio_manager.h
@@ -47,7 +47,7 @@ class MEDIA_EXPORT AudioManager {
// Similar to Create() except also schedules a monitor on the given task
// runner to ensure the audio thread is not stuck for more than 60 seconds; if
- // a hang is detected, the process will be crashed.
+ // a hang is detected, the process will be crashed. See EnableHangMonitor().
static AudioManager* CreateWithHangTimer(
AudioLogFactory* audio_log_factory,
const scoped_refptr<base::SingleThreadTaskRunner>& monitor_task_runner);
@@ -55,6 +55,12 @@ class MEDIA_EXPORT AudioManager {
// Similar to Create() except uses a FakeAudioLogFactory for testing.
static AudioManager* CreateForTesting();
+ // Enables the hang monitor for the AudioManager once it's created. Must be
+ // called before the AudioManager is created. CreateWithHangTimer() requires
+ // either switches::kEnableAudioHangMonitor to be present or this to have been
+ // called previously to start the hang monitor. Does nothing on OSX.
+ static void EnableHangMonitor();
+
// Should only be used for testing. Resets a previously-set
// AudioManagerFactory. The instance of AudioManager is not affected.
static void ResetFactoryForTesting();
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | media/audio/audio_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698