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

Side by Side Diff: webrtc/sdk/android/src/jni/androidnetworkmonitor_jni.cc

Issue 2623313004: Replace RTC_DCHECK(false) with RTC_NOTREACHED(). (Closed)
Patch Set: Created 3 years, 11 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/pc/channel.cc ('k') | webrtc/voice_engine/output_mixer.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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 case NETWORK_4G: 77 case NETWORK_4G:
78 case NETWORK_3G: 78 case NETWORK_3G:
79 case NETWORK_2G: 79 case NETWORK_2G:
80 case NETWORK_UNKNOWN_CELLULAR: 80 case NETWORK_UNKNOWN_CELLULAR:
81 return rtc::ADAPTER_TYPE_CELLULAR; 81 return rtc::ADAPTER_TYPE_CELLULAR;
82 case NETWORK_BLUETOOTH: 82 case NETWORK_BLUETOOTH:
83 // There is no corresponding mapping for bluetooth networks. 83 // There is no corresponding mapping for bluetooth networks.
84 // Map it to VPN for now. 84 // Map it to VPN for now.
85 return rtc::ADAPTER_TYPE_VPN; 85 return rtc::ADAPTER_TYPE_VPN;
86 default: 86 default:
87 RTC_DCHECK(false) << "Invalid network type " << network_type; 87 RTC_NOTREACHED() << "Invalid network type " << network_type;
88 return rtc::ADAPTER_TYPE_UNKNOWN; 88 return rtc::ADAPTER_TYPE_UNKNOWN;
89 } 89 }
90 } 90 }
91 91
92 static rtc::IPAddress GetIPAddressFromJava(JNIEnv* jni, jobject j_ip_address) { 92 static rtc::IPAddress GetIPAddressFromJava(JNIEnv* jni, jobject j_ip_address) {
93 jclass j_ip_address_class = GetObjectClass(jni, j_ip_address); 93 jclass j_ip_address_class = GetObjectClass(jni, j_ip_address);
94 jfieldID j_address_id = GetFieldID(jni, j_ip_address_class, "address", "[B"); 94 jfieldID j_address_id = GetFieldID(jni, j_ip_address_class, "address", "[B");
95 jbyteArray j_addresses = 95 jbyteArray j_addresses =
96 static_cast<jbyteArray>(GetObjectField(jni, j_ip_address, j_address_id)); 96 static_cast<jbyteArray>(GetObjectField(jni, j_ip_address, j_address_id));
97 size_t address_length = jni->GetArrayLength(j_addresses); 97 size_t address_length = jni->GetArrayLength(j_addresses);
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 JOW(void, NetworkMonitor_nativeNotifyOfNetworkDisconnect)( 427 JOW(void, NetworkMonitor_nativeNotifyOfNetworkDisconnect)(
428 JNIEnv* jni, jobject j_monitor, jlong j_native_monitor, 428 JNIEnv* jni, jobject j_monitor, jlong j_native_monitor,
429 jlong network_handle) { 429 jlong network_handle) {
430 AndroidNetworkMonitor* network_monitor = 430 AndroidNetworkMonitor* network_monitor =
431 reinterpret_cast<AndroidNetworkMonitor*>(j_native_monitor); 431 reinterpret_cast<AndroidNetworkMonitor*>(j_native_monitor);
432 network_monitor->OnNetworkDisconnected( 432 network_monitor->OnNetworkDisconnected(
433 static_cast<NetworkHandle>(network_handle)); 433 static_cast<NetworkHandle>(network_handle));
434 } 434 }
435 435
436 } // namespace webrtc_jni 436 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « webrtc/pc/channel.cc ('k') | webrtc/voice_engine/output_mixer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698