| 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 #ifndef COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ | 5 #ifndef COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ |
| 6 #define COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ | 6 #define COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 protected: | 43 protected: |
| 44 friend class base::RefCountedThreadSafe<URLRequestAdapterDelegate>; | 44 friend class base::RefCountedThreadSafe<URLRequestAdapterDelegate>; |
| 45 virtual ~URLRequestAdapterDelegate() {} | 45 virtual ~URLRequestAdapterDelegate() {} |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 URLRequestAdapter(URLRequestContextAdapter* context, | 48 URLRequestAdapter(URLRequestContextAdapter* context, |
| 49 URLRequestAdapterDelegate* delegate, | 49 URLRequestAdapterDelegate* delegate, |
| 50 GURL url, | 50 GURL url, |
| 51 net::RequestPriority priority); | 51 net::RequestPriority priority); |
| 52 virtual ~URLRequestAdapter(); | 52 ~URLRequestAdapter() override; |
| 53 | 53 |
| 54 // Sets the request method GET, POST etc | 54 // Sets the request method GET, POST etc |
| 55 void SetMethod(const std::string& method); | 55 void SetMethod(const std::string& method); |
| 56 | 56 |
| 57 // Adds a header to the request | 57 // Adds a header to the request |
| 58 void AddHeader(const std::string& name, const std::string& value); | 58 void AddHeader(const std::string& name, const std::string& value); |
| 59 | 59 |
| 60 // Sets the contents of the POST or PUT request | 60 // Sets the contents of the POST or PUT request |
| 61 void SetUploadContent(const char* bytes, int bytes_len); | 61 void SetUploadContent(const char* bytes, int bytes_len); |
| 62 | 62 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 bool chunked_upload_; | 163 bool chunked_upload_; |
| 164 // Indicates whether redirect has been disabled. | 164 // Indicates whether redirect has been disabled. |
| 165 bool disable_redirect_; | 165 bool disable_redirect_; |
| 166 | 166 |
| 167 DISALLOW_COPY_AND_ASSIGN(URLRequestAdapter); | 167 DISALLOW_COPY_AND_ASSIGN(URLRequestAdapter); |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 } // namespace cronet | 170 } // namespace cronet |
| 171 | 171 |
| 172 #endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ | 172 #endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ |
| OLD | NEW |