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

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

Issue 1976683003: Update the type and cost of existing networks if its type is found later by network monitor (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Minor changes 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 | « webrtc/api/java/jni/androidnetworkmonitor_jni.cc ('k') | webrtc/base/network.h » ('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 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 } else if (fields[i] == kAttributeCandidatePwd) { 1110 } else if (fields[i] == kAttributeCandidatePwd) {
1111 password = fields[++i]; 1111 password = fields[++i];
1112 } else if (fields[i] == kAttributeCandidateNetworkId) { 1112 } else if (fields[i] == kAttributeCandidateNetworkId) {
1113 if (!GetValueFromString(first_line, fields[++i], &network_id, error)) { 1113 if (!GetValueFromString(first_line, fields[++i], &network_id, error)) {
1114 return false; 1114 return false;
1115 } 1115 }
1116 } else if (fields[i] == kAttributeCandidateNetworkCost) { 1116 } else if (fields[i] == kAttributeCandidateNetworkCost) {
1117 if (!GetValueFromString(first_line, fields[++i], &network_cost, error)) { 1117 if (!GetValueFromString(first_line, fields[++i], &network_cost, error)) {
1118 return false; 1118 return false;
1119 } 1119 }
1120 network_cost = std::min(network_cost, cricket::kMaxNetworkCost); 1120 network_cost = std::min(network_cost, rtc::kNetworkCostMax);
1121 } else { 1121 } else {
1122 // Skip the unknown extension. 1122 // Skip the unknown extension.
1123 ++i; 1123 ++i;
1124 } 1124 }
1125 } 1125 }
1126 1126
1127 *candidate = Candidate(component_id, cricket::ProtoToString(protocol), 1127 *candidate = Candidate(component_id, cricket::ProtoToString(protocol),
1128 address, priority, username, password, candidate_type, 1128 address, priority, username, password, candidate_type,
1129 generation, foundation, network_id, network_cost); 1129 generation, foundation, network_id, network_cost);
1130 candidate->set_related_address(related_address); 1130 candidate->set_related_address(related_address);
(...skipping 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after
3175 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( 3175 UpdateCodec<AudioContentDescription, cricket::AudioCodec>(
3176 media_desc, payload_type, feedback_param); 3176 media_desc, payload_type, feedback_param);
3177 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { 3177 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) {
3178 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( 3178 UpdateCodec<VideoContentDescription, cricket::VideoCodec>(
3179 media_desc, payload_type, feedback_param); 3179 media_desc, payload_type, feedback_param);
3180 } 3180 }
3181 return true; 3181 return true;
3182 } 3182 }
3183 3183
3184 } // namespace webrtc 3184 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/java/jni/androidnetworkmonitor_jni.cc ('k') | webrtc/base/network.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698