class ClientSocketHandle;
class HttpAuthController;
class HttpNetworkSession;
-class HttpStreamBase;
+class HttpStream;
class HttpStreamRequest;
class IOBuffer;
class ProxyInfo;
HttpNetworkTransaction(RequestPriority priority,
HttpNetworkSession* session);
- virtual ~HttpNetworkTransaction();
+ ~HttpNetworkTransaction() override;
// HttpTransaction methods:
- virtual int Start(const HttpRequestInfo* request_info,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) OVERRIDE;
- virtual int RestartIgnoringLastError(
- const CompletionCallback& callback) OVERRIDE;
- virtual int RestartWithCertificate(
- X509Certificate* client_cert,
- const CompletionCallback& callback) OVERRIDE;
- virtual int RestartWithAuth(const AuthCredentials& credentials,
- const CompletionCallback& callback) OVERRIDE;
- virtual bool IsReadyToRestartForAuth() OVERRIDE;
-
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) OVERRIDE;
- virtual void StopCaching() OVERRIDE;
- virtual bool GetFullRequestHeaders(
- HttpRequestHeaders* headers) const OVERRIDE;
- virtual int64 GetTotalReceivedBytes() const OVERRIDE;
- virtual void DoneReading() OVERRIDE;
- virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE;
- virtual LoadState GetLoadState() const OVERRIDE;
- virtual UploadProgress GetUploadProgress() const OVERRIDE;
- virtual void SetQuicServerInfo(QuicServerInfo* quic_server_info) OVERRIDE;
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const OVERRIDE;
- virtual void SetPriority(RequestPriority priority) OVERRIDE;
- virtual void SetWebSocketHandshakeStreamCreateHelper(
- WebSocketHandshakeStreamBase::CreateHelper* create_helper) OVERRIDE;
- virtual void SetBeforeNetworkStartCallback(
- const BeforeNetworkStartCallback& callback) OVERRIDE;
- virtual void SetBeforeProxyHeadersSentCallback(
- const BeforeProxyHeadersSentCallback& callback) OVERRIDE;
- virtual int ResumeNetworkStart() OVERRIDE;
+ int Start(const HttpRequestInfo* request_info,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
+ int RestartIgnoringLastError(const CompletionCallback& callback) override;
+ int RestartWithCertificate(X509Certificate* client_cert,
+ const CompletionCallback& callback) override;
+ int RestartWithAuth(const AuthCredentials& credentials,
+ const CompletionCallback& callback) override;
+ bool IsReadyToRestartForAuth() override;
+
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void StopCaching() override;
+ bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
+ int64 GetTotalReceivedBytes() const override;
+ void DoneReading() override;
+ const HttpResponseInfo* GetResponseInfo() const override;
+ LoadState GetLoadState() const override;
+ UploadProgress GetUploadProgress() const override;
+ void SetQuicServerInfo(QuicServerInfo* quic_server_info) override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ void SetPriority(RequestPriority priority) override;
+ void SetWebSocketHandshakeStreamCreateHelper(
+ WebSocketHandshakeStreamBase::CreateHelper* create_helper) override;
+ void SetBeforeNetworkStartCallback(
+ const BeforeNetworkStartCallback& callback) override;
+ void SetBeforeProxyHeadersSentCallback(
+ const BeforeProxyHeadersSentCallback& callback) override;
+ int ResumeNetworkStart() override;
// HttpStreamRequest::Delegate methods:
- virtual void OnStreamReady(const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStreamBase* stream) OVERRIDE;
- virtual void OnWebSocketHandshakeStreamReady(
+ void OnStreamReady(const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpStream* stream) override;
+ void OnWebSocketHandshakeStreamReady(
const SSLConfig& used_ssl_config,
const ProxyInfo& used_proxy_info,
- WebSocketHandshakeStreamBase* stream) OVERRIDE;
- virtual void OnStreamFailed(int status,
- const SSLConfig& used_ssl_config) OVERRIDE;
- virtual void OnCertificateError(int status,
+ WebSocketHandshakeStreamBase* stream) override;
+ void OnStreamFailed(int status, const SSLConfig& used_ssl_config) override;
+ void OnCertificateError(int status,
+ const SSLConfig& used_ssl_config,
+ const SSLInfo& ssl_info) override;
+ void OnNeedsProxyAuth(const HttpResponseInfo& response_info,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpAuthController* auth_controller) override;
+ void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
+ SSLCertRequestInfo* cert_info) override;
+ void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
const SSLConfig& used_ssl_config,
- const SSLInfo& ssl_info) OVERRIDE;
- virtual void OnNeedsProxyAuth(
- const HttpResponseInfo& response_info,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpAuthController* auth_controller) OVERRIDE;
- virtual void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
- SSLCertRequestInfo* cert_info) OVERRIDE;
- virtual void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStreamBase* stream) OVERRIDE;
+ const ProxyInfo& used_proxy_info,
+ HttpStream* stream) override;
private:
friend class HttpNetworkTransactionSSLTest;
void BuildRequestHeaders(bool using_proxy);
- // Record histogram of time until first byte of header is received.
- void LogTransactionConnectedMetrics();
-
- // Record histogram of latency (durations until last byte received).
- void LogTransactionMetrics() const;
-
// Writes a log message to help debugging in the field when we block a proxy
// response to a CONNECT request.
void LogBlockedTunnelResponse(int response_code) const;
// Debug helper.
static std::string DescribeState(State state);
- void SetStream(HttpStreamBase* stream);
+ void SetStream(HttpStream* stream);
scoped_refptr<HttpAuthController>
auth_controllers_[HttpAuth::AUTH_NUM_TARGETS];
ProxyInfo proxy_info_;
scoped_ptr<HttpStreamRequest> stream_request_;
- scoped_ptr<HttpStreamBase> stream_;
+ scoped_ptr<HttpStream> stream_;
// True if we've validated the headers that the stream parser has returned.
bool headers_valid_;
- // True if we've logged the time of the first response byte. Used to
- // prevent logging across authentication activity where we see multiple
- // responses.
- bool logged_response_time_;
-
SSLConfig server_ssl_config_;
SSLConfig proxy_ssl_config_;
// fallback_error_code contains the error code that caused the last TLS
// Total number of bytes received on streams for this transaction.
int64 total_received_bytes_;
- // The time the Start method was called.
- base::Time start_time_;
-
// When the transaction started / finished sending the request, including
// the body, if present.
base::TimeTicks send_start_time_;