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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2582703003: Audio output debug recording. (Closed)
Patch Set: Code review. 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 327f3ac7afc667e00a3fbdc9e7d978a25c53c328..a9558cafac5e65172af9cbfc597ac59181853ef1 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/chooser_service.mojom.h"
#include "device/usb/public/interfaces/device_manager.mojom.h"
#include "extensions/features/features.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"
@@ -1100,8 +1101,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>(
@@ -3432,7 +3435,7 @@ bool ChromeContentBrowserClient::
"BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
}
-//static
+// static
void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
const storage::QuotaSettings* settings) {
g_default_quota_settings = settings;
« no previous file with comments | « no previous file | chrome/browser/media/audio_debug_recordings_handler.h » ('j') | content/browser/browser_main_loop.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698