| OLD | NEW |
| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 if (enum_name == "CONNECTION_NONE") { | 67 if (enum_name == "CONNECTION_NONE") { |
| 68 return NetworkType::NETWORK_NONE; | 68 return NetworkType::NETWORK_NONE; |
| 69 } | 69 } |
| 70 ASSERT(false); | 70 ASSERT(false); |
| 71 return NetworkType::NETWORK_UNKNOWN; | 71 return NetworkType::NETWORK_UNKNOWN; |
| 72 } | 72 } |
| 73 | 73 |
| 74 static rtc::AdapterType AdapterTypeFromNetworkType(NetworkType network_type) { | 74 static rtc::AdapterType AdapterTypeFromNetworkType(NetworkType network_type) { |
| 75 switch (network_type) { | 75 switch (network_type) { |
| 76 case NETWORK_UNKNOWN: | 76 case NETWORK_UNKNOWN: |
| 77 LOG(LS_WARNING) << "Unknown network type"; | 77 RTC_DCHECK(false) << "Unknown network type"; |
| 78 return rtc::ADAPTER_TYPE_UNKNOWN; | 78 return rtc::ADAPTER_TYPE_UNKNOWN; |
| 79 case NETWORK_ETHERNET: | 79 case NETWORK_ETHERNET: |
| 80 return rtc::ADAPTER_TYPE_ETHERNET; | 80 return rtc::ADAPTER_TYPE_ETHERNET; |
| 81 case NETWORK_WIFI: | 81 case NETWORK_WIFI: |
| 82 return rtc::ADAPTER_TYPE_WIFI; | 82 return rtc::ADAPTER_TYPE_WIFI; |
| 83 case NETWORK_4G: | 83 case NETWORK_4G: |
| 84 case NETWORK_3G: | 84 case NETWORK_3G: |
| 85 case NETWORK_2G: | 85 case NETWORK_2G: |
| 86 return rtc::ADAPTER_TYPE_CELLULAR; | 86 return rtc::ADAPTER_TYPE_CELLULAR; |
| 87 case NETWORK_BLUETOOTH: | 87 case NETWORK_BLUETOOTH: |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 JOW(void, NetworkMonitor_nativeNotifyOfNetworkDisconnect)( | 375 JOW(void, NetworkMonitor_nativeNotifyOfNetworkDisconnect)( |
| 376 JNIEnv* jni, jobject j_monitor, jlong j_native_monitor, | 376 JNIEnv* jni, jobject j_monitor, jlong j_native_monitor, |
| 377 jint network_handle) { | 377 jint network_handle) { |
| 378 AndroidNetworkMonitor* network_monitor = | 378 AndroidNetworkMonitor* network_monitor = |
| 379 reinterpret_cast<AndroidNetworkMonitor*>(j_native_monitor); | 379 reinterpret_cast<AndroidNetworkMonitor*>(j_native_monitor); |
| 380 network_monitor->OnNetworkDisconnected( | 380 network_monitor->OnNetworkDisconnected( |
| 381 static_cast<NetworkHandle>(network_handle)); | 381 static_cast<NetworkHandle>(network_handle)); |
| 382 } | 382 } |
| 383 | 383 |
| 384 } // namespace webrtc_jni | 384 } // namespace webrtc_jni |
| OLD | NEW |