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

Unified Diff: chromecast/browser/cast_content_browser_client.cc

Issue 2784433002: Ensures that audio tasks cannot run after AudioManager is deleted. (Closed)
Patch Set: rebase Created 3 years, 7 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 | « chromecast/browser/cast_content_browser_client.h ('k') | chromecast/media/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 84ecfd3cba83c6a807a7e850afb7397757b3db0e..e5e89216ddbe9eeb2bc85ea44207c3face3fefaa 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/bind_source_info.h"
@@ -192,11 +193,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>
« no previous file with comments | « chromecast/browser/cast_content_browser_client.h ('k') | chromecast/media/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698