| 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 "test_upload_data_stream_handler.h" | 5 #include "test_upload_data_stream_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/message_loop/message_loop_proxy.h" | |
| 13 #include "jni/TestUploadDataStreamHandler_jni.h" | 12 #include "jni/TestUploadDataStreamHandler_jni.h" |
| 14 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
| 15 | 14 |
| 16 namespace cronet { | 15 namespace cronet { |
| 17 | 16 |
| 18 static const size_t kReadBufferSize = 32768; | 17 static const size_t kReadBufferSize = 32768; |
| 19 | 18 |
| 20 TestUploadDataStreamHandler::TestUploadDataStreamHandler( | 19 TestUploadDataStreamHandler::TestUploadDataStreamHandler( |
| 21 scoped_ptr<net::UploadDataStream> upload_data_stream, | 20 scoped_ptr<net::UploadDataStream> upload_data_stream, |
| 22 JNIEnv* env, | 21 JNIEnv* env, |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 TestUploadDataStreamHandler* handler = new TestUploadDataStreamHandler( | 176 TestUploadDataStreamHandler* handler = new TestUploadDataStreamHandler( |
| 178 upload_data_stream.Pass(), env, jtest_upload_data_stream_handler); | 177 upload_data_stream.Pass(), env, jtest_upload_data_stream_handler); |
| 179 return reinterpret_cast<jlong>(handler); | 178 return reinterpret_cast<jlong>(handler); |
| 180 } | 179 } |
| 181 | 180 |
| 182 bool TestUploadDataStreamHandlerRegisterJni(JNIEnv* env) { | 181 bool TestUploadDataStreamHandlerRegisterJni(JNIEnv* env) { |
| 183 return RegisterNativesImpl(env); | 182 return RegisterNativesImpl(env); |
| 184 } | 183 } |
| 185 | 184 |
| 186 } // namespace cronet | 185 } // namespace cronet |
| OLD | NEW |