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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2582703003: Audio output debug recording. (Closed)
Patch Set: Rebase. Created 3 years, 10 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: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index fa37b77ec9d21b7d335dd46cc59061023f630661..42488271b03223ddc5e4ba7aa9df524722f6ed1c 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -185,6 +185,7 @@
#include "device/usb/public/interfaces/device_manager.mojom.h"
#include "extensions/features/features.h"
#include "gpu/config/gpu_switches.h"
+#include "media/audio/audio_manager.h"
#include "media/media_features.h"
#include "net/base/mime_util.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
@@ -1104,8 +1105,10 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
new base::UserDataAdapter<WebRtcLoggingHandlerHost>(
webrtc_logging_handler_host));
+ // The audio manager outlives the host, so it's safe to hand a raw pointer to
+ // it to the AudioDebugRecordingsHandler, which is owned by the host.
AudioDebugRecordingsHandler* audio_debug_recordings_handler =
- new AudioDebugRecordingsHandler(profile);
+ new AudioDebugRecordingsHandler(profile, media::AudioManager::Get());
host->SetUserData(
AudioDebugRecordingsHandler::kAudioDebugRecordingsHandlerKey,
new base::UserDataAdapter<AudioDebugRecordingsHandler>(

Powered by Google App Engine
This is Rietveld 408576698