diff options
author | shouqun.liu@intel.com <shouqun.liu@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-12 08:43:26 +0000 |
---|---|---|
committer | shouqun.liu@intel.com <shouqun.liu@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-12 08:43:26 +0000 |
commit | 2fe036455d7058577e3d38210eb67de3b88acc76 (patch) | |
tree | 5647cfba7f71ff316c25b00da88cf127e681d890 /net/android/network_library.cc | |
parent | 387e543b11b8898524b9ab52bd5a9fb4c4a7df24 (diff) | |
download | chromium_src-2fe036455d7058577e3d38210eb67de3b88acc76.zip chromium_src-2fe036455d7058577e3d38210eb67de3b88acc76.tar.gz chromium_src-2fe036455d7058577e3d38210eb67de3b88acc76.tar.bz2 |
Implement net::GetNetworkList() for Android.
* Implement net::GetNetworkList() by java.net.NetworkInterface through JNI.
* Remove NetUtilTest.GetNetworkList from net_unittests_apk disabled list.
BUG=
TEST=net_unittests_apk --gtest-filter=NetUtilTest.GetNetworkList
Review URL: https://chromiumcodereview.appspot.com/10905207
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/android/network_library.cc')
-rw-r--r-- | net/android/network_library.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/android/network_library.cc b/net/android/network_library.cc index d518abaf..64f11aa 100644 --- a/net/android/network_library.cc +++ b/net/android/network_library.cc @@ -69,6 +69,13 @@ bool HaveOnlyLoopbackAddresses() { return Java_AndroidNetworkLibrary_haveOnlyLoopbackAddresses(env); } +std::string GetNetworkList() { + JNIEnv* env = AttachCurrentThread(); + ScopedJavaLocalRef<jstring> ret = + Java_AndroidNetworkLibrary_getNetworkList(env); + return ConvertJavaStringToUTF8(ret); +} + bool GetMimeTypeFromExtension(const std::string& extension, std::string* result) { JNIEnv* env = AttachCurrentThread(); |