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

Side by Side Diff: webrtc/api/webrtcsdp.cc

Issue 2568833002: Refactor "secure bool" into explicit PROTO_TLS. (Closed)
Patch Set: GetRelayPreference(): Add RTC_DCHECK(proto == PROTO_UDP). Created 4 years 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 | « webrtc/api/peerconnectionfactory_unittest.cc ('k') | webrtc/api/webrtcsession_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 /* 1 /*
2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2011 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 return false; 1025 return false;
1026 } 1026 }
1027 const std::string& connection_address = fields[4]; 1027 const std::string& connection_address = fields[4];
1028 int port = 0; 1028 int port = 0;
1029 if (!GetValueFromString(first_line, fields[5], &port, error)) { 1029 if (!GetValueFromString(first_line, fields[5], &port, error)) {
1030 return false; 1030 return false;
1031 } 1031 }
1032 SocketAddress address(connection_address, port); 1032 SocketAddress address(connection_address, port);
1033 1033
1034 cricket::ProtocolType protocol; 1034 cricket::ProtocolType protocol;
1035 if (!StringToProto(transport.c_str(), &protocol)) { 1035 if (!StringToProto(transport.c_str(), &protocol) ||
1036 protocol == cricket::PROTO_TLS) {
1036 return ParseFailed(first_line, "Unsupported transport type.", error); 1037 return ParseFailed(first_line, "Unsupported transport type.", error);
1037 } 1038 }
1038 1039
1039 std::string candidate_type; 1040 std::string candidate_type;
1040 const std::string& type = fields[7]; 1041 const std::string& type = fields[7];
1041 if (type == kCandidateHost) { 1042 if (type == kCandidateHost) {
1042 candidate_type = cricket::LOCAL_PORT_TYPE; 1043 candidate_type = cricket::LOCAL_PORT_TYPE;
1043 } else if (type == kCandidateSrflx) { 1044 } else if (type == kCandidateSrflx) {
1044 candidate_type = cricket::STUN_PORT_TYPE; 1045 candidate_type = cricket::STUN_PORT_TYPE;
1045 } else if (type == kCandidateRelay) { 1046 } else if (type == kCandidateRelay) {
(...skipping 2127 matching lines...) Expand 10 before | Expand all | Expand 10 after
3173 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( 3174 UpdateCodec<AudioContentDescription, cricket::AudioCodec>(
3174 media_desc, payload_type, feedback_param); 3175 media_desc, payload_type, feedback_param);
3175 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { 3176 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) {
3176 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( 3177 UpdateCodec<VideoContentDescription, cricket::VideoCodec>(
3177 media_desc, payload_type, feedback_param); 3178 media_desc, payload_type, feedback_param);
3178 } 3179 }
3179 return true; 3180 return true;
3180 } 3181 }
3181 3182
3182 } // namespace webrtc 3183 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/peerconnectionfactory_unittest.cc ('k') | webrtc/api/webrtcsession_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698