Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: net/url_request/url_request.h

Issue 10832003: Add const accessors to URLRequest and UploadData. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Forgot to check browser_tests Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/base/upload_data_stream.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 UploadData* get_upload(); 416 const UploadData* get_upload() const;
417 UploadData* get_upload_mutable();
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
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_
OLDNEW
« no previous file with comments | « net/base/upload_data_stream.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698