| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/test_upload_data_stream_handler.h" | 5 #include "components/cronet/android/test/test_upload_data_stream_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/android/jni_android.h" | 11 #include "base/android/jni_android.h" |
| 12 #include "base/android/jni_string.h" | 12 #include "base/android/jni_string.h" |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "jni/TestUploadDataStreamHandler_jni.h" | 14 #include "jni/TestUploadDataStreamHandler_jni.h" |
| 15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
| 16 #include "net/log/net_log_with_source.h" |
| 16 | 17 |
| 17 using base::android::JavaParamRef; | 18 using base::android::JavaParamRef; |
| 18 | 19 |
| 19 namespace cronet { | 20 namespace cronet { |
| 20 | 21 |
| 21 static const size_t kReadBufferSize = 32768; | 22 static const size_t kReadBufferSize = 32768; |
| 22 | 23 |
| 23 TestUploadDataStreamHandler::TestUploadDataStreamHandler( | 24 TestUploadDataStreamHandler::TestUploadDataStreamHandler( |
| 24 std::unique_ptr<net::UploadDataStream> upload_data_stream, | 25 std::unique_ptr<net::UploadDataStream> upload_data_stream, |
| 25 JNIEnv* env, | 26 JNIEnv* env, |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 TestUploadDataStreamHandler* handler = new TestUploadDataStreamHandler( | 190 TestUploadDataStreamHandler* handler = new TestUploadDataStreamHandler( |
| 190 std::move(upload_data_stream), env, jtest_upload_data_stream_handler); | 191 std::move(upload_data_stream), env, jtest_upload_data_stream_handler); |
| 191 return reinterpret_cast<jlong>(handler); | 192 return reinterpret_cast<jlong>(handler); |
| 192 } | 193 } |
| 193 | 194 |
| 194 bool TestUploadDataStreamHandlerRegisterJni(JNIEnv* env) { | 195 bool TestUploadDataStreamHandlerRegisterJni(JNIEnv* env) { |
| 195 return RegisterNativesImpl(env); | 196 return RegisterNativesImpl(env); |
| 196 } | 197 } |
| 197 | 198 |
| 198 } // namespace cronet | 199 } // namespace cronet |
| OLD | NEW |