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

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

Issue 23494023: Mark URLRequest::GetResponseCode() as const (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 // OnResponseStarted method has been called. 521 // OnResponseStarted method has been called.
522 void GetMimeType(std::string* mime_type); 522 void GetMimeType(std::string* mime_type);
523 523
524 // Get the charset (character encoding). This method may only be called once 524 // Get the charset (character encoding). This method may only be called once
525 // the delegate's OnResponseStarted method has been called. 525 // the delegate's OnResponseStarted method has been called.
526 void GetCharset(std::string* charset); 526 void GetCharset(std::string* charset);
527 527
528 // Returns the HTTP response code (e.g., 200, 404, and so on). This method 528 // Returns the HTTP response code (e.g., 200, 404, and so on). This method
529 // may only be called once the delegate's OnResponseStarted method has been 529 // may only be called once the delegate's OnResponseStarted method has been
530 // called. For non-HTTP requests, this method returns -1. 530 // called. For non-HTTP requests, this method returns -1.
531 int GetResponseCode(); 531 int GetResponseCode() const;
532 532
533 // Get the HTTP response info in its entirety. 533 // Get the HTTP response info in its entirety.
534 const HttpResponseInfo& response_info() const { return response_info_; } 534 const HttpResponseInfo& response_info() const { return response_info_; }
535 535
536 // Access the LOAD_* flags modifying this request (see load_flags.h). 536 // Access the LOAD_* flags modifying this request (see load_flags.h).
537 int load_flags() const { return load_flags_; } 537 int load_flags() const { return load_flags_; }
538 void set_load_flags(int flags) { load_flags_ = flags; } 538 void set_load_flags(int flags) { load_flags_ = flags; }
539 539
540 // Returns true if the request is "pending" (i.e., if Start() has been called, 540 // Returns true if the request is "pending" (i.e., if Start() has been called,
541 // and the response has not yet been called). 541 // and the response has not yet been called).
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 LoadTimingInfo load_timing_info_; 859 LoadTimingInfo load_timing_info_;
860 860
861 scoped_ptr<const base::debug::StackTrace> stack_trace_; 861 scoped_ptr<const base::debug::StackTrace> stack_trace_;
862 862
863 DISALLOW_COPY_AND_ASSIGN(URLRequest); 863 DISALLOW_COPY_AND_ASSIGN(URLRequest);
864 }; 864 };
865 865
866 } // namespace net 866 } // namespace net
867 867
868 #endif // NET_URL_REQUEST_URL_REQUEST_H_ 868 #endif // NET_URL_REQUEST_URL_REQUEST_H_
OLDNEW
« no previous file with comments | « no previous file | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698