OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 NET_URL_REQUEST_URL_FETCHER_H_ | 5 #ifndef NET_URL_REQUEST_URL_FETCHER_H_ |
6 #define NET_URL_REQUEST_URL_FETCHER_H_ | 6 #define NET_URL_REQUEST_URL_FETCHER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // call one of the SetUpload* methods before the request is started. | 143 // call one of the SetUpload* methods before the request is started. |
144 // |upload_content_type| is the MIME type of the content, while | 144 // |upload_content_type| is the MIME type of the content, while |
145 // |file_path| is the path to the file containing the data to be sent (the | 145 // |file_path| is the path to the file containing the data to be sent (the |
146 // Content-Length header value will be set to the length of this file). | 146 // Content-Length header value will be set to the length of this file). |
147 // |range_offset| and |range_length| specify the range of the part | 147 // |range_offset| and |range_length| specify the range of the part |
148 // to be uploaded. To upload the whole file, (0, kuint64max) can be used. | 148 // to be uploaded. To upload the whole file, (0, kuint64max) can be used. |
149 // |file_task_runner| will be used for all file operations. | 149 // |file_task_runner| will be used for all file operations. |
150 virtual void SetUploadFilePath( | 150 virtual void SetUploadFilePath( |
151 const std::string& upload_content_type, | 151 const std::string& upload_content_type, |
152 const base::FilePath& file_path, | 152 const base::FilePath& file_path, |
153 uint64 range_offset, | 153 uint64_t range_offset, |
154 uint64 range_length, | 154 uint64_t range_length, |
155 scoped_refptr<base::TaskRunner> file_task_runner) = 0; | 155 scoped_refptr<base::TaskRunner> file_task_runner) = 0; |
156 | 156 |
157 // Sets data only needed by POSTs. All callers making POST requests should | 157 // Sets data only needed by POSTs. All callers making POST requests should |
158 // call one of the SetUpload* methods before the request is started. | 158 // call one of the SetUpload* methods before the request is started. |
159 // |upload_content_type| is the MIME type of the content, while |callback| is | 159 // |upload_content_type| is the MIME type of the content, while |callback| is |
160 // the callback to create the upload data stream (the Content-Length header | 160 // the callback to create the upload data stream (the Content-Length header |
161 // value will be set to the length of this data). |callback| may be called | 161 // value will be set to the length of this data). |callback| may be called |
162 // mutliple times if the request is retried. | 162 // mutliple times if the request is retried. |
163 virtual void SetUploadStreamFactory( | 163 virtual void SetUploadStreamFactory( |
164 const std::string& upload_content_type, | 164 const std::string& upload_content_type, |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 // be removed once the URLFetcher is destroyed. User should not take | 329 // be removed once the URLFetcher is destroyed. User should not take |
330 // ownership more than once, or call this method after taking ownership. | 330 // ownership more than once, or call this method after taking ownership. |
331 virtual bool GetResponseAsFilePath( | 331 virtual bool GetResponseAsFilePath( |
332 bool take_ownership, | 332 bool take_ownership, |
333 base::FilePath* out_response_path) const = 0; | 333 base::FilePath* out_response_path) const = 0; |
334 }; | 334 }; |
335 | 335 |
336 } // namespace net | 336 } // namespace net |
337 | 337 |
338 #endif // NET_URL_REQUEST_URL_FETCHER_H_ | 338 #endif // NET_URL_REQUEST_URL_FETCHER_H_ |
OLD | NEW |