| Index: components/cronet/android/test/native_test_server.cc
|
| diff --git a/components/cronet/android/test/native_test_server.cc b/components/cronet/android/test/native_test_server.cc
|
| index ce8c95153845286f36953e25c212413d66503cca..88f150fe93b89da11a2a577b0035531ff1b37e69 100644
|
| --- a/components/cronet/android/test/native_test_server.cc
|
| +++ b/components/cronet/android/test/native_test_server.cc
|
| @@ -20,6 +20,7 @@
|
| #include "components/cronet/android/cronet_url_request_context_adapter.h"
|
| #include "components/cronet/android/url_request_context_adapter.h"
|
| #include "jni/NativeTestServer_jni.h"
|
| +#include "net/base/host_port_pair.h"
|
| #include "net/base/url_util.h"
|
| #include "net/dns/host_resolver_impl.h"
|
| #include "net/dns/mock_host_resolver.h"
|
| @@ -298,6 +299,13 @@ jstring GetSdchURL(JNIEnv* env, jclass jcaller) {
|
| return base::android::ConvertUTF8ToJavaString(env, url).Release();
|
| }
|
|
|
| +jstring GetHostPort(JNIEnv* env, jclass jcaller) {
|
| + DCHECK(g_test_server);
|
| + std::string host_port =
|
| + net::HostPortPair::FromURL(g_test_server->base_url()).ToString();
|
| + return base::android::ConvertUTF8ToJavaString(env, host_port).Release();
|
| +}
|
| +
|
| bool RegisterNativeTestServer(JNIEnv* env) {
|
| return RegisterNativesImpl(env);
|
| }
|
|
|