Commit 10c85f5d authored by boriay@yandex-team.ru's avatar boriay@yandex-team.ru

Mark URLRequest::GetResponseCode() as const

The URLRequestJob interface this forwards to is const, and marking URLRequest::GetResponseCode() as const allows passing the URLRequest as const in some cases.

BUG=none

Review URL: https://chromiumcodereview.appspot.com/23494023

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221958 0039d316-1c4b-4281-b951-d872f2087c98
parent 51e91497
...@@ -453,7 +453,7 @@ void URLRequest::GetCharset(string* charset) { ...@@ -453,7 +453,7 @@ void URLRequest::GetCharset(string* charset) {
job_->GetCharset(charset); job_->GetCharset(charset);
} }
int URLRequest::GetResponseCode() { int URLRequest::GetResponseCode() const {
DCHECK(job_.get()); DCHECK(job_.get());
return job_->GetResponseCode(); return job_->GetResponseCode();
} }
......
...@@ -528,7 +528,7 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe), ...@@ -528,7 +528,7 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
// Returns the HTTP response code (e.g., 200, 404, and so on). This method // Returns the HTTP response code (e.g., 200, 404, and so on). This method
// may only be called once the delegate's OnResponseStarted method has been // may only be called once the delegate's OnResponseStarted method has been
// called. For non-HTTP requests, this method returns -1. // called. For non-HTTP requests, this method returns -1.
int GetResponseCode(); int GetResponseCode() const;
// Get the HTTP response info in its entirety. // Get the HTTP response info in its entirety.
const HttpResponseInfo& response_info() const { return response_info_; } const HttpResponseInfo& response_info() const { return response_info_; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment