diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-07 01:31:57 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-07 01:31:57 +0000 |
commit | c5afdbde93d1daf443c1cc8b3ecb5cae51f55f60 (patch) | |
tree | 80298e0bd82a13f8d70020bc7f0edf37a0832b8b /net/url_request | |
parent | 8f56bc760b7bb6cfb62a86c2120842128f5c2ade (diff) | |
download | chromium_src-c5afdbde93d1daf443c1cc8b3ecb5cae51f55f60.zip chromium_src-c5afdbde93d1daf443c1cc8b3ecb5cae51f55f60.tar.gz chromium_src-c5afdbde93d1daf443c1cc8b3ecb5cae51f55f60.tar.bz2 |
Reverting 11179.
Reverting CL as plugin UI tests fail on Vista
Review URL: http://codereview.chromium.org/40260
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11187 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r-- | net/url_request/url_request.cc | 18 | ||||
-rw-r--r-- | net/url_request/url_request.h | 17 | ||||
-rw-r--r-- | net/url_request/url_request_job.h | 3 |
3 files changed, 6 insertions, 32 deletions
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc index 3de8439..fefd24c 100644 --- a/net/url_request/url_request.cc +++ b/net/url_request/url_request.cc @@ -260,23 +260,10 @@ void URLRequest::Start() { } void URLRequest::Cancel() { - DoCancel(net::ERR_ABORTED, net::SSLInfo()); + CancelWithError(net::ERR_ABORTED); } -void URLRequest::SimulateError(int os_error) { - DoCancel(os_error, net::SSLInfo()); -} - -void URLRequest::SimulateSSLError(int os_error, const net::SSLInfo& ssl_info) { - // This should only be called on a started request. - if (!is_pending_ || !job_ || job_->has_response_started()) { - NOTREACHED(); - return; - } - DoCancel(os_error, ssl_info); -} - -void URLRequest::DoCancel(int os_error, const net::SSLInfo& ssl_info) { +void URLRequest::CancelWithError(int os_error) { DCHECK(os_error < 0); // If the URL request already has an error status, then canceling is a no-op. @@ -284,7 +271,6 @@ void URLRequest::DoCancel(int os_error, const net::SSLInfo& ssl_info) { if (status_.is_success()) { status_.set_status(URLRequestStatus::CANCELED); status_.set_os_error(os_error); - response_info_.ssl_info = ssl_info; } // There's nothing to do if we are not waiting on a Job. diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h index 4309689..f4aee3a 100644 --- a/net/url_request/url_request.h +++ b/net/url_request/url_request.h @@ -354,15 +354,10 @@ class URLRequest { // no effect once the response has completed. void Cancel(); - // Cancels the request and sets the error to |os_error| (see net_error_list.h - // for values). - void SimulateError(int os_error); - - // Cancels the request and sets the error to |os_error| (see net_error_list.h - // for values) and attaches |ssl_info| as the SSLInfo for that request. This - // is useful to attach a certificate and certificate error to a canceled - // request. - void SimulateSSLError(int os_error, const net::SSLInfo& ssl_info); + // Similar to Cancel but sets the error to |os_error| (see net_error_list.h + // for values) instead of net::ERR_ABORTED. + // Used to attach a reason for canceling a request. + void CancelWithError(int os_error); // Read initiates an asynchronous read from the response, and must only // be called after the OnResponseStarted callback is received with a @@ -440,10 +435,6 @@ class URLRequest { // been orphaned. void OrphanJob(); - // Cancels the request and set the error and ssl info for this request to the - // passed values. - void DoCancel(int os_error, const net::SSLInfo& ssl_info); - // Discard headers which have meaning in POST (Content-Length, Content-Type, // Origin). static std::string StripPostSpecificHeaders(const std::string& headers); diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h index aac3768..fae5a1b 100644 --- a/net/url_request/url_request_job.h +++ b/net/url_request/url_request_job.h @@ -192,9 +192,6 @@ class URLRequestJob : public base::RefCountedThreadSafe<URLRequestJob> { expected_content_size_ = size; } - // Whether we have processed the response for that request yet. - bool has_response_started() const { return has_handled_response_; } - protected: // Notifies the job that headers have been received. void NotifyHeadersComplete(); |