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

Side by Side Diff: webrtc/api/java/jni/androidnetworkmonitor_jni.cc

Issue 1668073002: Add network cost as part of the connection comparison. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix sdp test error (do not signal network cost if it is 0) Created 4 years, 10 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 | webrtc/api/webrtcsdp.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 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 network_info_by_handle_.clear(); 306 network_info_by_handle_.clear();
307 for (NetworkInformation network : network_infos) { 307 for (NetworkInformation network : network_infos) {
308 OnNetworkConnected_w(network); 308 OnNetworkConnected_w(network);
309 } 309 }
310 } 310 }
311 311
312 rtc::AdapterType AndroidNetworkMonitor::GetAdapterType( 312 rtc::AdapterType AndroidNetworkMonitor::GetAdapterType(
313 const std::string& if_name) { 313 const std::string& if_name) {
314 auto iter = adapter_type_by_name_.find(if_name); 314 auto iter = adapter_type_by_name_.find(if_name);
315 if (iter == adapter_type_by_name_.end()) { 315 if (iter == adapter_type_by_name_.end()) {
316 LOG(LS_WARNING) << "Get adapter type for an unknown interface: " << if_name;
316 return rtc::ADAPTER_TYPE_UNKNOWN; 317 return rtc::ADAPTER_TYPE_UNKNOWN;
317 } 318 }
318 return iter->second; 319 return iter->second;
319 } 320 }
320 321
321 rtc::NetworkMonitorInterface* 322 rtc::NetworkMonitorInterface*
322 AndroidNetworkMonitorFactory::CreateNetworkMonitor() { 323 AndroidNetworkMonitorFactory::CreateNetworkMonitor() {
323 return new AndroidNetworkMonitor(); 324 return new AndroidNetworkMonitor();
324 } 325 }
325 326
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 JOW(void, NetworkMonitor_nativeNotifyOfNetworkDisconnect)( 359 JOW(void, NetworkMonitor_nativeNotifyOfNetworkDisconnect)(
359 JNIEnv* jni, jobject j_monitor, jlong j_native_monitor, 360 JNIEnv* jni, jobject j_monitor, jlong j_native_monitor,
360 jint network_handle) { 361 jint network_handle) {
361 AndroidNetworkMonitor* network_monitor = 362 AndroidNetworkMonitor* network_monitor =
362 reinterpret_cast<AndroidNetworkMonitor*>(j_native_monitor); 363 reinterpret_cast<AndroidNetworkMonitor*>(j_native_monitor);
363 network_monitor->OnNetworkDisconnected( 364 network_monitor->OnNetworkDisconnected(
364 static_cast<NetworkHandle>(network_handle)); 365 static_cast<NetworkHandle>(network_handle));
365 } 366 }
366 367
367 } // namespace webrtc_jni 368 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/webrtcsdp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698