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

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

Issue 2753013002: DCHECK that the security origin for a media request isn't empty (Closed)
Patch Set: DCHECK that the security origin for a media request isn't empty 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 unified diff | Download patch
« no previous file with comments | « content/public/common/media_stream_request.h ('k') | no next file » | 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 <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 return; 1024 return;
1025 case MEDIA_DEVICE_PERMISSION_DISMISSED: 1025 case MEDIA_DEVICE_PERMISSION_DISMISSED:
1026 request.requestFailedUASpecific("PermissionDismissedError"); 1026 request.requestFailedUASpecific("PermissionDismissedError");
1027 return; 1027 return;
1028 case MEDIA_DEVICE_INVALID_STATE: 1028 case MEDIA_DEVICE_INVALID_STATE:
1029 request.requestFailedUASpecific("InvalidStateError"); 1029 request.requestFailedUASpecific("InvalidStateError");
1030 return; 1030 return;
1031 case MEDIA_DEVICE_NO_HARDWARE: 1031 case MEDIA_DEVICE_NO_HARDWARE:
1032 request.requestFailedUASpecific("DevicesNotFoundError"); 1032 request.requestFailedUASpecific("DevicesNotFoundError");
1033 return; 1033 return;
1034 case MEDIA_DEVICE_INVALID_SECURITY_ORIGIN: 1034 case MEDIA_DEVICE_INVALID_SECURITY_ORIGIN_DEPRECATED:
1035 request.requestFailedUASpecific("InvalidSecurityOriginError"); 1035 NOTREACHED();
1036 return; 1036 return;
1037 case MEDIA_DEVICE_TAB_CAPTURE_FAILURE: 1037 case MEDIA_DEVICE_TAB_CAPTURE_FAILURE:
1038 request.requestFailedUASpecific("TabCaptureError"); 1038 request.requestFailedUASpecific("TabCaptureError");
1039 return; 1039 return;
1040 case MEDIA_DEVICE_SCREEN_CAPTURE_FAILURE: 1040 case MEDIA_DEVICE_SCREEN_CAPTURE_FAILURE:
1041 request.requestFailedUASpecific("ScreenCaptureError"); 1041 request.requestFailedUASpecific("ScreenCaptureError");
1042 return; 1042 return;
1043 case MEDIA_DEVICE_CAPTURE_FAILURE: 1043 case MEDIA_DEVICE_CAPTURE_FAILURE:
1044 request.requestFailedUASpecific("DeviceCaptureError"); 1044 request.requestFailedUASpecific("DeviceCaptureError");
1045 return; 1045 return;
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 const blink::WebString& result_name) { 1361 const blink::WebString& result_name) {
1362 // Check if we're waiting to be notified of this source. If not, then we'll 1362 // Check if we're waiting to be notified of this source. If not, then we'll
1363 // ignore the notification. 1363 // ignore the notification.
1364 auto found = std::find(sources_waiting_for_callback_.begin(), 1364 auto found = std::find(sources_waiting_for_callback_.begin(),
1365 sources_waiting_for_callback_.end(), source); 1365 sources_waiting_for_callback_.end(), source);
1366 if (found != sources_waiting_for_callback_.end()) 1366 if (found != sources_waiting_for_callback_.end())
1367 OnTrackStarted(source, result, result_name); 1367 OnTrackStarted(source, result, result_name);
1368 } 1368 }
1369 1369
1370 } // namespace content 1370 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/media_stream_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698