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

Unified Diff: chromecast/browser/cast_content_browser_client.cc

Issue 2784433002: Ensures that audio tasks cannot run after AudioManager is deleted. (Closed)
Patch Set: cleanup Created 3 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
Index: chromecast/browser/cast_content_browser_client.cc
diff --git a/chromecast/browser/cast_content_browser_client.cc b/chromecast/browser/cast_content_browser_client.cc
index d2a3e0df7efa70e7b1eb3133048f0b0889a42a57..20b4bf9ba4509ed0599cffe06ef0269a404e32e4 100644
--- a/chromecast/browser/cast_content_browser_client.cc
+++ b/chromecast/browser/cast_content_browser_client.cc
@@ -55,6 +55,7 @@
#include "content/public/common/service_names.mojom.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/web_preferences.h"
+#include "media/audio/audio_thread_impl.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "net/url_request/url_request_context_getter.h"
#include "services/service_manager/public/cpp/binder_registry.h"
@@ -191,11 +192,12 @@ CastContentBrowserClient::media_pipeline_backend_manager() {
return cast_browser_main_parts_->media_pipeline_backend_manager();
}
-::media::ScopedAudioManagerPtr CastContentBrowserClient::CreateAudioManager(
+std::unique_ptr<::media::AudioManager>
+CastContentBrowserClient::CreateAudioManager(
::media::AudioLogFactory* audio_log_factory) {
- return ::media::ScopedAudioManagerPtr(new media::CastAudioManager(
- GetMediaTaskRunner(), GetMediaTaskRunner(), audio_log_factory,
- media_pipeline_backend_manager()));
+ return base::MakeUnique<media::CastAudioManager>(
+ base::MakeUnique<::media::AudioThreadImpl>(), audio_log_factory,
+ media_pipeline_backend_manager());
}
std::unique_ptr<::media::CdmFactory>

Powered by Google App Engine
This is Rietveld 408576698