diff options
Diffstat (limited to 'chromium/net/http/http_network_transaction.h')
-rw-r--r-- | chromium/net/http/http_network_transaction.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/chromium/net/http/http_network_transaction.h b/chromium/net/http/http_network_transaction.h index ea02de6957c..866b5a28170 100644 --- a/chromium/net/http/http_network_transaction.h +++ b/chromium/net/http/http_network_transaction.h @@ -90,6 +90,9 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction const BeforeNetworkStartCallback& callback) override; void SetBeforeHeadersSentCallback( const BeforeHeadersSentCallback& callback) override; + void SetRequestHeadersCallback(RequestHeadersCallback callback) override; + void SetResponseHeadersCallback(ResponseHeadersCallback callback) override; + int ResumeNetworkStart() override; // HttpStreamRequest::Delegate methods: @@ -104,7 +107,9 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction const SSLConfig& used_ssl_config, const ProxyInfo& used_proxy_info, std::unique_ptr<WebSocketHandshakeStreamBase> stream) override; - void OnStreamFailed(int status, const SSLConfig& used_ssl_config) override; + void OnStreamFailed(int status, + const NetErrorDetails& net_error_details, + const SSLConfig& used_ssl_config) override; void OnCertificateError(int status, const SSLConfig& used_ssl_config, const SSLInfo& ssl_info) override; @@ -247,6 +252,10 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction // should be resent in case of a socket reuse/close race. bool ShouldResendRequest() const; + // Returns true if there have already been |kMaxRetryAttempts| retries for + // HTTP2 or QUIC network errors, and no further retries should be attempted. + bool HasExceededMaxRetries() const; + // Resets the connection and the request headers for resend. Called when // ShouldResendRequest() is true. void ResetConnectionAndRequestForResend(); @@ -389,6 +398,8 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction BeforeNetworkStartCallback before_network_start_callback_; BeforeHeadersSentCallback before_headers_sent_callback_; + RequestHeadersCallback request_headers_callback_; + ResponseHeadersCallback response_headers_callback_; ConnectionAttempts connection_attempts_; IPEndPoint remote_endpoint_; @@ -399,6 +410,15 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction // throttled state to the transaction. std::unique_ptr<NetworkThrottleManager::Throttle> throttle_; + // Number of retries made for network errors like ERR_SPDY_PING_FAILED, + // ERR_SPDY_SERVER_REFUSED_STREAM, ERR_QUIC_HANDSHAKE_FAILED and + // ERR_QUIC_PROTOCOL_ERROR. Currently we stop after 3 tries + // (including the initial request) and fail the request. + // This count excludes retries on reused sockets since a well + // behaved server may time those out and thus the number + // of times we can retry a request on reused sockets is limited. + size_t retry_attempts_; + DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); }; |