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

Unified Diff: content/renderer/media/rtc_peer_connection_handler.cc

Issue 1321543002: Enable generation of local host candidate when RTCConfiguration is null. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/renderer/media/rtc_peer_connection_handler.cc
diff --git a/content/renderer/media/rtc_peer_connection_handler.cc b/content/renderer/media/rtc_peer_connection_handler.cc
index 626e5c91eb70f8eac21a3230002662126aa386f1..df926eb4770b87d4ab375a1a1e853cf4d8724271 100644
--- a/content/renderer/media/rtc_peer_connection_handler.cc
+++ b/content/renderer/media/rtc_peer_connection_handler.cc
@@ -185,8 +185,20 @@ void GetSdpAndTypeFromSessionDescription(
void GetNativeRtcConfiguration(
const blink::WebRTCConfiguration& blink_config,
webrtc::PeerConnectionInterface::RTCConfiguration* webrtc_config) {
- if (blink_config.isNull() || !webrtc_config)
+ if (!webrtc_config)
return;
+
+ // When we don't have WebRTCConfiguration, treat it as a special case where we
+ // should generate local host candidate. This will only be honored if
+ // enable_multiple_routes is disabled.
+ if (blink_config.isNull()) {
+ webrtc_config->enable_localhost_ice_candidate = true;
+ return;
+ }
+
+ webrtc_config->enable_localhost_ice_candidate =
juberti 2015/08/28 00:24:49 What does this do, exactly?
+ blink_config.enableLocalhostCandidate();
+
for (size_t i = 0; i < blink_config.numberOfServers(); ++i) {
webrtc::PeerConnectionInterface::IceServer server;
const blink::WebRTCICEServer& webkit_server =
« 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