diff options
Diffstat (limited to 'net/url_request/url_request.h')
-rw-r--r-- | net/url_request/url_request.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h index f4aee3a..4309689 100644 --- a/net/url_request/url_request.h +++ b/net/url_request/url_request.h @@ -354,10 +354,15 @@ class URLRequest { // no effect once the response has completed. void Cancel(); - // 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); + // 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); // Read initiates an asynchronous read from the response, and must only // be called after the OnResponseStarted callback is received with a @@ -435,6 +440,10 @@ 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); |