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

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

Issue 251082: Add a response_info() accessor to URLRequest to get a reference to the net::H... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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_unittest.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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 381
382 // Get the charset (character encoding). This method may only be called once 382 // Get the charset (character encoding). This method may only be called once
383 // the delegate's OnResponseStarted method has been called. 383 // the delegate's OnResponseStarted method has been called.
384 void GetCharset(std::string* charset); 384 void GetCharset(std::string* charset);
385 385
386 // Returns the HTTP response code (e.g., 200, 404, and so on). This method 386 // Returns the HTTP response code (e.g., 200, 404, and so on). This method
387 // may only be called once the delegate's OnResponseStarted method has been 387 // may only be called once the delegate's OnResponseStarted method has been
388 // called. For non-HTTP requests, this method returns -1. 388 // called. For non-HTTP requests, this method returns -1.
389 int GetResponseCode(); 389 int GetResponseCode();
390 390
391 // Get the HTTP response info in its entirety.
392 const net::HttpResponseInfo& response_info() const { return response_info_; }
393
391 // Access the net::LOAD_* flags modifying this request (see load_flags.h). 394 // Access the net::LOAD_* flags modifying this request (see load_flags.h).
392 int load_flags() const { return load_flags_; } 395 int load_flags() const { return load_flags_; }
393 void set_load_flags(int flags) { load_flags_ = flags; } 396 void set_load_flags(int flags) { load_flags_ = flags; }
394 397
395 // Returns true if the request is "pending" (i.e., if Start() has been called, 398 // Returns true if the request is "pending" (i.e., if Start() has been called,
396 // and the response has not yet been called). 399 // and the response has not yet been called).
397 bool is_pending() const { return is_pending_; } 400 bool is_pending() const { return is_pending_; }
398 401
399 // Returns the error status of the request. This value is 0 if there is no 402 // Returns the error status of the request. This value is 0 if there is no
400 // error. Otherwise, it is a value defined by the operating system (e.g., an 403 // error. Otherwise, it is a value defined by the operating system (e.g., an
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 670
668 void InsertIntoGraveyard(const RecentRequestInfo& info); 671 void InsertIntoGraveyard(const RecentRequestInfo& info);
669 672
670 base::LinkedList<InstanceTrackerNode> live_instances_; 673 base::LinkedList<InstanceTrackerNode> live_instances_;
671 674
672 size_t next_graveyard_index_; 675 size_t next_graveyard_index_;
673 RecentRequestInfoList graveyard_; 676 RecentRequestInfoList graveyard_;
674 }; 677 };
675 678
676 #endif // NET_URL_REQUEST_URL_REQUEST_H_ 679 #endif // NET_URL_REQUEST_URL_REQUEST_H_
OLDNEW
« no previous file with comments | « no previous file | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698