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_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 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
406 // | 406 // |
407 // This method may be called only after calling EnableChunkedUpload(). | 407 // This method may be called only after calling EnableChunkedUpload(). |
408 void AppendChunkToUpload(const char* bytes, | 408 void AppendChunkToUpload(const char* bytes, |
409 int bytes_len, | 409 int bytes_len, |
410 bool is_last_chunk); | 410 bool is_last_chunk); |
411 | 411 |
412 // Set the upload data directly. | 412 // Set the upload data directly. |
413 void set_upload(UploadData* upload); | 413 void set_upload(UploadData* upload); |
414 | 414 |
415 // Get the upload data directly. | 415 // Get the upload data directly. |
416 const UploadData* get_upload() const; | |
gavinp
2012/07/27 20:28:56
Hrm, I wonder why this method name doesn't meet ou
vabr (Chromium)
2012/07/28 20:37:09
Well, I don't know, just copied the style from the
| |
416 UploadData* get_upload(); | 417 UploadData* get_upload(); |
gavinp
2012/07/27 20:28:56
get_upload_mutable() here, too?
vabr (Chromium)
2012/07/28 20:37:09
Done.
| |
417 | 418 |
418 // Returns true if the request has a non-empty message body to upload. | 419 // Returns true if the request has a non-empty message body to upload. |
419 bool has_upload() const; | 420 bool has_upload() const; |
420 | 421 |
421 // Set an extra request header by ID or name. These methods may only be | 422 // Set an extra request header by ID or name. These methods may only be |
422 // called before Start() is called. It is an error to call it later. | 423 // called before Start() is called. It is an error to call it later. |
423 void SetExtraRequestHeaderById(int header_id, const std::string& value, | 424 void SetExtraRequestHeaderById(int header_id, const std::string& value, |
424 bool overwrite); | 425 bool overwrite); |
425 void SetExtraRequestHeaderByName(const std::string& name, | 426 void SetExtraRequestHeaderByName(const std::string& name, |
426 const std::string& value, bool overwrite); | 427 const std::string& value, bool overwrite); |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
815 base::TimeTicks creation_time_; | 816 base::TimeTicks creation_time_; |
816 | 817 |
817 scoped_ptr<const base::debug::StackTrace> stack_trace_; | 818 scoped_ptr<const base::debug::StackTrace> stack_trace_; |
818 | 819 |
819 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 820 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
820 }; | 821 }; |
821 | 822 |
822 } // namespace net | 823 } // namespace net |
823 | 824 |
824 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 825 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
OLD | NEW |