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

Side by Side Diff: content/renderer/media/user_media_client_impl.cc

Issue 1982593003: Remove bogus DCHECK in content::UserMediaClientImpl and update unit test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: phoglund's nit Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/media/user_media_client_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/user_media_client_impl.h" 5 #include "content/renderer/media/user_media_client_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 746
747 DeleteUserMediaRequestInfo(request); 747 DeleteUserMediaRequestInfo(request);
748 } 748 }
749 749
750 void UserMediaClientImpl::OnDevicesEnumerated( 750 void UserMediaClientImpl::OnDevicesEnumerated(
751 int request_id, 751 int request_id,
752 const StreamDeviceInfoArray& device_array) { 752 const StreamDeviceInfoArray& device_array) {
753 DVLOG(1) << "UserMediaClientImpl::OnDevicesEnumerated(" << request_id << ")"; 753 DVLOG(1) << "UserMediaClientImpl::OnDevicesEnumerated(" << request_id << ")";
754 754
755 MediaDevicesRequestInfo* request = FindMediaDevicesRequestInfo(request_id); 755 MediaDevicesRequestInfo* request = FindMediaDevicesRequestInfo(request_id);
756 DCHECK(request); 756 if (!request)
757 return;
757 758
758 if (request_id == request->audio_input_request_id) { 759 if (request_id == request->audio_input_request_id) {
759 request->has_audio_input_returned = true; 760 request->has_audio_input_returned = true;
760 request->audio_input_devices = device_array; 761 request->audio_input_devices = device_array;
761 } else if (request_id == request->video_input_request_id) { 762 } else if (request_id == request->video_input_request_id) {
762 request->has_video_input_returned = true; 763 request->has_video_input_returned = true;
763 request->video_input_devices = device_array; 764 request->video_input_devices = device_array;
764 } else { 765 } else {
765 DCHECK_EQ(request->audio_output_request_id, request_id); 766 DCHECK_EQ(request->audio_output_request_id, request_id);
766 request->has_audio_output_returned = true; 767 request->has_audio_output_returned = true;
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 return; 1180 return;
1180 } 1181 }
1181 } 1182 }
1182 } 1183 }
1183 1184
1184 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { 1185 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const {
1185 return !sources_waiting_for_callback_.empty(); 1186 return !sources_waiting_for_callback_.empty();
1186 } 1187 }
1187 1188
1188 } // namespace content 1189 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/user_media_client_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698