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

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

Issue 144363005: Make sure DeviceRequestMessageFilter cancel all pending EnumerateDevices requests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reverted pid changes Created 6 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/device_request_message_filter.cc
diff --git a/content/browser/renderer_host/media/device_request_message_filter.cc b/content/browser/renderer_host/media/device_request_message_filter.cc
index d5e36da5721d2c9f4172076ecc4aeb659e2ee4d3..37e3bea3c6530df6210d1e75cf2d091b252271d9 100644
--- a/content/browser/renderer_host/media/device_request_message_filter.cc
+++ b/content/browser/renderer_host/media/device_request_message_filter.cc
@@ -122,8 +122,11 @@ bool DeviceRequestMessageFilter::OnMessageReceived(const IPC::Message& message,
void DeviceRequestMessageFilter::OnChannelClosing() {
// Since the IPC channel is gone, cancel outstanding device requests.
- media_stream_manager_->CancelAllRequests(peer_pid());
-
+ for (DeviceRequestList::iterator request_it = requests_.begin();
+ request_it != requests_.end(); ++request_it) {
+ media_stream_manager_->CancelRequest(request_it->audio_devices_label);
+ media_stream_manager_->CancelRequest(request_it->video_devices_label);
+ }
requests_.clear();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698