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

Side by Side Diff: net/android/network_library.cc

Issue 2486393004: Expose API to detect when captive portal probe was blocked on Android (Closed)
Patch Set: Add permission to AndroidManifest.xml for running the unittest Created 4 years 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 | « net/android/network_library.h ('k') | net/android/network_library_unittest.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 // 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
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
OLDNEW
« no previous file with comments | « net/android/network_library.h ('k') | net/android/network_library_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698