| Index: components/cronet/android/url_request_adapter.h
|
| diff --git a/components/cronet/android/url_request_adapter.h b/components/cronet/android/url_request_adapter.h
|
| index 482f175f626527975157ff9f2736fde8f475030d..89c034503f9a7429ba3bcd0709db7f017038f4a5 100644
|
| --- a/components/cronet/android/url_request_adapter.h
|
| +++ b/components/cronet/android/url_request_adapter.h
|
| @@ -38,6 +38,7 @@ class URLRequestAdapter : public net::URLRequest::Delegate {
|
| virtual void OnBytesRead(URLRequestAdapter* request) = 0;
|
| virtual void OnRequestFinished(URLRequestAdapter* request) = 0;
|
| virtual int ReadFromUploadChannel(net::IOBuffer* buf, int buf_length) = 0;
|
| + virtual void OnAppendChunkCompleted(URLRequestAdapter* request) = 0;
|
|
|
| protected:
|
| friend class base::RefCountedThreadSafe<URLRequestAdapterDelegate>;
|
| @@ -62,6 +63,16 @@ class URLRequestAdapter : public net::URLRequest::Delegate {
|
| // Sets the request to streaming upload.
|
| void SetUploadChannel(JNIEnv* env, int64 content_length);
|
|
|
| + // Indicates that the request body will be streamed by calling
|
| + // AppendChunkToUpload() repeatedly. This must be called before Start().
|
| + void EnableChunkedUpload();
|
| +
|
| + // Appends a chunk to the upload.
|
| + // This must be called after EnableChunkedUpload() and Start().
|
| + void AppendChunkToUpload(const char* bytes,
|
| + int bytes_len,
|
| + bool is_last_chunk);
|
| +
|
| // Starts the request.
|
| void Start();
|
|
|
| @@ -136,6 +147,7 @@ class URLRequestAdapter : public net::URLRequest::Delegate {
|
| std::string content_type_;
|
| bool canceled_;
|
| int64 expected_size_;
|
| + bool chunked_upload_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(URLRequestAdapter);
|
| };
|
|
|