OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/cronet/android/test/native_test_server.h" | 5 #include "components/cronet/android/test/native_test_server.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "jni/NativeTestServer_jni.h" | 25 #include "jni/NativeTestServer_jni.h" |
26 #include "net/base/host_port_pair.h" | 26 #include "net/base/host_port_pair.h" |
27 #include "net/base/url_util.h" | 27 #include "net/base/url_util.h" |
28 #include "net/http/http_status_code.h" | 28 #include "net/http/http_status_code.h" |
29 #include "net/test/embedded_test_server/embedded_test_server.h" | 29 #include "net/test/embedded_test_server/embedded_test_server.h" |
30 #include "net/test/embedded_test_server/http_request.h" | 30 #include "net/test/embedded_test_server/http_request.h" |
31 #include "net/test/embedded_test_server/http_response.h" | 31 #include "net/test/embedded_test_server/http_response.h" |
32 #include "net/test/embedded_test_server/request_handler_util.h" | 32 #include "net/test/embedded_test_server/request_handler_util.h" |
33 #include "url/gurl.h" | 33 #include "url/gurl.h" |
34 | 34 |
| 35 using base::android::JavaParamRef; |
| 36 using base::android::ScopedJavaLocalRef; |
| 37 |
35 namespace cronet { | 38 namespace cronet { |
36 | 39 |
37 namespace { | 40 namespace { |
38 | 41 |
39 const char kEchoBodyPath[] = "/echo_body"; | 42 const char kEchoBodyPath[] = "/echo_body"; |
40 const char kEchoHeaderPath[] = "/echo_header"; | 43 const char kEchoHeaderPath[] = "/echo_header"; |
41 const char kEchoAllHeadersPath[] = "/echo_all_headers"; | 44 const char kEchoAllHeadersPath[] = "/echo_all_headers"; |
42 const char kEchoMethodPath[] = "/echo_method"; | 45 const char kEchoMethodPath[] = "/echo_method"; |
43 const char kRedirectToEchoBodyPath[] = "/redirect_to_echo_body"; | 46 const char kRedirectToEchoBodyPath[] = "/redirect_to_echo_body"; |
44 const char kExabyteResponsePath[] = "/exabyte_response"; | 47 const char kExabyteResponsePath[] = "/exabyte_response"; |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 #else | 324 #else |
322 return JNI_FALSE; | 325 return JNI_FALSE; |
323 #endif | 326 #endif |
324 } | 327 } |
325 | 328 |
326 bool RegisterNativeTestServer(JNIEnv* env) { | 329 bool RegisterNativeTestServer(JNIEnv* env) { |
327 return RegisterNativesImpl(env); | 330 return RegisterNativesImpl(env); |
328 } | 331 } |
329 | 332 |
330 } // namespace cronet | 333 } // namespace cronet |
OLD | NEW |