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

Side by Side Diff: talk/app/webrtc/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: 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 | talk/app/webrtc/webrtcsdp.cc » ('j') | webrtc/p2p/base/candidate.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 network_info_by_handle_.clear(); 323 network_info_by_handle_.clear();
324 for (NetworkInformation network : network_infos) { 324 for (NetworkInformation network : network_infos) {
325 OnNetworkConnected_w(network); 325 OnNetworkConnected_w(network);
326 } 326 }
327 } 327 }
328 328
329 rtc::AdapterType AndroidNetworkMonitor::GetAdapterType( 329 rtc::AdapterType AndroidNetworkMonitor::GetAdapterType(
330 const std::string& if_name) { 330 const std::string& if_name) {
331 auto iter = adapter_type_by_name_.find(if_name); 331 auto iter = adapter_type_by_name_.find(if_name);
332 if (iter == adapter_type_by_name_.end()) { 332 if (iter == adapter_type_by_name_.end()) {
333 LOG(LS_WARNING) << "Get adapter type for an unknown interface: " << if_name;
333 return rtc::ADAPTER_TYPE_UNKNOWN; 334 return rtc::ADAPTER_TYPE_UNKNOWN;
334 } 335 }
335 return iter->second; 336 return iter->second;
336 } 337 }
337 338
338 rtc::NetworkMonitorInterface* 339 rtc::NetworkMonitorInterface*
339 AndroidNetworkMonitorFactory::CreateNetworkMonitor() { 340 AndroidNetworkMonitorFactory::CreateNetworkMonitor() {
340 return new AndroidNetworkMonitor(); 341 return new AndroidNetworkMonitor();
341 } 342 }
342 343
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 JOW(void, NetworkMonitor_nativeNotifyOfNetworkDisconnect)( 376 JOW(void, NetworkMonitor_nativeNotifyOfNetworkDisconnect)(
376 JNIEnv* jni, jobject j_monitor, jlong j_native_monitor, 377 JNIEnv* jni, jobject j_monitor, jlong j_native_monitor,
377 jint network_handle) { 378 jint network_handle) {
378 AndroidNetworkMonitor* network_monitor = 379 AndroidNetworkMonitor* network_monitor =
379 reinterpret_cast<AndroidNetworkMonitor*>(j_native_monitor); 380 reinterpret_cast<AndroidNetworkMonitor*>(j_native_monitor);
380 network_monitor->OnNetworkDisconnected( 381 network_monitor->OnNetworkDisconnected(
381 static_cast<NetworkHandle>(network_handle)); 382 static_cast<NetworkHandle>(network_handle));
382 } 383 }
383 384
384 } // namespace webrtc_jni 385 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/webrtcsdp.cc » ('j') | webrtc/p2p/base/candidate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698