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

Unified Diff: content/browser/renderer_host/media/audio_renderer_host.cc

Issue 2529853002: Fix shutdown crash in AudioOutputAuthorizationHandler. (Closed)
Patch Set: Add mac comment. Created 4 years, 1 month 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: content/browser/renderer_host/media/audio_renderer_host.cc
diff --git a/content/browser/renderer_host/media/audio_renderer_host.cc b/content/browser/renderer_host/media/audio_renderer_host.cc
index 4d1511f3f6cc0339bc3072c6e1a91561aa7e7ef7..26042453ea5c95383cea268848f331b9b9e67148 100644
--- a/content/browser/renderer_host/media/audio_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host.cc
@@ -45,11 +45,8 @@ base::LazyInstance<media::AudioStreamsTracker> g_audio_streams_tracker =
LAZY_INSTANCE_INITIALIZER;
std::pair<int, std::pair<bool, std::string>> MakeAuthorizationData(
- int stream_id,
- bool authorized,
- const std::string& device_unique_id) {
- return std::make_pair(stream_id,
- std::make_pair(authorized, device_unique_id));
+ int stream_id) {
+ return std::make_pair(stream_id, std::make_pair(false, std::string()));
o1ka 2016/11/24 13:17:36 call it directly?
Max Morin 2016/11/24 14:12:20 Done.
}
@@ -199,7 +196,10 @@ AudioRendererHost::AudioRendererHost(int render_process_id,
salt_(salt),
validate_render_frame_id_function_(&ValidateRenderFrameId),
max_simultaneous_streams_(0),
- authorization_handler_(media_stream_manager, render_process_id_, salt) {
+ authorization_handler_(audio_manager_,
+ media_stream_manager,
+ render_process_id_,
+ salt) {
DCHECK(audio_manager_);
}
@@ -387,7 +387,7 @@ void AudioRendererHost::OnRequestDeviceAuthorization(
<< ", security_origin=" << security_origin << ")";
if (LookupById(stream_id) || IsAuthorizationStarted(stream_id))
return;
- authorizations_.insert(MakeAuthorizationData(stream_id, false, device_id));
+ authorizations_.insert(MakeAuthorizationData(stream_id));
// Unretained is ok here since |this| owns |authorization_handler_| and
// |authorization_handler_| owns the callback.
authorization_handler_.RequestDeviceAuthorization(

Powered by Google App Engine
This is Rietveld 408576698