OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_REQUEST_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 323 |
324 // Indicates that the request body should be sent using chunked transfer | 324 // Indicates that the request body should be sent using chunked transfer |
325 // encoding. This method may only be called before Start() is called. | 325 // encoding. This method may only be called before Start() is called. |
326 void EnableChunkedUpload(); | 326 void EnableChunkedUpload(); |
327 | 327 |
328 // Appends the given bytes to the request's upload data to be sent | 328 // Appends the given bytes to the request's upload data to be sent |
329 // immediately via chunked transfer encoding. When all data has been sent, | 329 // immediately via chunked transfer encoding. When all data has been sent, |
330 // call MarkEndOfChunks() to indicate the end of upload data. | 330 // call MarkEndOfChunks() to indicate the end of upload data. |
331 // | 331 // |
332 // This method may be called only after calling EnableChunkedUpload(). | 332 // This method may be called only after calling EnableChunkedUpload(). |
333 void AppendChunkToUpload(const char* bytes, int bytes_len); | 333 void AppendChunkToUpload(const char* bytes, |
334 | 334 int bytes_len, |
335 // Indicates the end of a chunked transfer encoded request body. | 335 bool is_last_chunk); |
336 void MarkEndOfChunks(); | |
337 | 336 |
338 // Set the upload data directly. | 337 // Set the upload data directly. |
339 void set_upload(net::UploadData* upload); | 338 void set_upload(net::UploadData* upload); |
340 | 339 |
341 // Get the upload data directly. | 340 // Get the upload data directly. |
342 net::UploadData* get_upload(); | 341 net::UploadData* get_upload(); |
343 | 342 |
344 // Returns true if the request has a non-empty message body to upload. | 343 // Returns true if the request has a non-empty message body to upload. |
345 bool has_upload() const; | 344 bool has_upload() const; |
346 | 345 |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 const uint64 identifier_; | 663 const uint64 identifier_; |
665 | 664 |
666 base::debug::LeakTracker<URLRequest> leak_tracker_; | 665 base::debug::LeakTracker<URLRequest> leak_tracker_; |
667 | 666 |
668 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 667 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
669 }; | 668 }; |
670 | 669 |
671 } // namespace net | 670 } // namespace net |
672 | 671 |
673 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 672 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
OLD | NEW |