| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/android/network_library.h" | 5 #include "net/android/network_library.h" |
| 6 | 6 |
| 7 #include "base/android/context_utils.h" | 7 #include "base/android/context_utils.h" |
| 8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
| 9 #include "base/android/jni_array.h" | 9 #include "base/android/jni_array.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 base::android::AttachCurrentThread(), | 120 base::android::AttachCurrentThread(), |
| 121 base::android::GetApplicationContext())); | 121 base::android::GetApplicationContext())); |
| 122 } | 122 } |
| 123 | 123 |
| 124 bool GetIsRoaming() { | 124 bool GetIsRoaming() { |
| 125 return Java_AndroidNetworkLibrary_getIsRoaming( | 125 return Java_AndroidNetworkLibrary_getIsRoaming( |
| 126 base::android::AttachCurrentThread(), | 126 base::android::AttachCurrentThread(), |
| 127 base::android::GetApplicationContext()); | 127 base::android::GetApplicationContext()); |
| 128 } | 128 } |
| 129 | 129 |
| 130 bool GetIsCaptivePortal() { |
| 131 return Java_AndroidNetworkLibrary_getIsCaptivePortal( |
| 132 base::android::AttachCurrentThread(), |
| 133 base::android::GetApplicationContext()); |
| 134 } |
| 135 |
| 130 std::string GetWifiSSID() { | 136 std::string GetWifiSSID() { |
| 131 return base::android::ConvertJavaStringToUTF8( | 137 return base::android::ConvertJavaStringToUTF8( |
| 132 Java_AndroidNetworkLibrary_getWifiSSID( | 138 Java_AndroidNetworkLibrary_getWifiSSID( |
| 133 base::android::AttachCurrentThread(), | 139 base::android::AttachCurrentThread(), |
| 134 base::android::GetApplicationContext())); | 140 base::android::GetApplicationContext())); |
| 135 } | 141 } |
| 136 | 142 |
| 137 } // namespace android | 143 } // namespace android |
| 138 } // namespace net | 144 } // namespace net |
| OLD | NEW |