Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: net/http/http_network_transaction.h

Issue 1006643002: Plumb connection attempts from (non-proxy) ConnectJobs to HttpNetworkTransaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, resolve conflict Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/http/http_cache_transaction.cc ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ 5 #ifndef NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ 6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "net/base/request_priority.h" 15 #include "net/base/request_priority.h"
16 #include "net/http/http_auth.h" 16 #include "net/http/http_auth.h"
17 #include "net/http/http_request_headers.h" 17 #include "net/http/http_request_headers.h"
18 #include "net/http/http_response_info.h" 18 #include "net/http/http_response_info.h"
19 #include "net/http/http_stream_factory.h" 19 #include "net/http/http_stream_factory.h"
20 #include "net/http/http_transaction.h" 20 #include "net/http/http_transaction.h"
21 #include "net/log/net_log.h" 21 #include "net/log/net_log.h"
22 #include "net/proxy/proxy_service.h" 22 #include "net/proxy/proxy_service.h"
23 #include "net/socket/connection_attempts.h"
23 #include "net/ssl/ssl_config_service.h" 24 #include "net/ssl/ssl_config_service.h"
24 #include "net/websockets/websocket_handshake_stream_base.h" 25 #include "net/websockets/websocket_handshake_stream_base.h"
25 26
26 namespace net { 27 namespace net {
27 28
28 class ClientSocketHandle; 29 class ClientSocketHandle;
29 class HttpAuthController; 30 class HttpAuthController;
30 class HttpNetworkSession; 31 class HttpNetworkSession;
31 class HttpStream; 32 class HttpStream;
32 class HttpStreamRequest; 33 class HttpStreamRequest;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 const SSLConfig& used_ssl_config, 93 const SSLConfig& used_ssl_config,
93 const ProxyInfo& used_proxy_info, 94 const ProxyInfo& used_proxy_info,
94 HttpAuthController* auth_controller) override; 95 HttpAuthController* auth_controller) override;
95 void OnNeedsClientAuth(const SSLConfig& used_ssl_config, 96 void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
96 SSLCertRequestInfo* cert_info) override; 97 SSLCertRequestInfo* cert_info) override;
97 void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info, 98 void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
98 const SSLConfig& used_ssl_config, 99 const SSLConfig& used_ssl_config,
99 const ProxyInfo& used_proxy_info, 100 const ProxyInfo& used_proxy_info,
100 HttpStream* stream) override; 101 HttpStream* stream) override;
101 102
103 void GetConnectionAttempts(ConnectionAttempts* out) const override;
104
102 private: 105 private:
103 friend class HttpNetworkTransactionSSLTest; 106 friend class HttpNetworkTransactionSSLTest;
104 107
105 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest, 108 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest,
106 ResetStateForRestart); 109 ResetStateForRestart);
107 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, 110 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest,
108 WindowUpdateReceived); 111 WindowUpdateReceived);
109 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, 112 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest,
110 WindowUpdateSent); 113 WindowUpdateSent);
111 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, 114 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest,
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 GURL AuthURL(HttpAuth::Target target) const; 253 GURL AuthURL(HttpAuth::Target target) const;
251 254
252 // Returns true if this transaction is for a WebSocket handshake 255 // Returns true if this transaction is for a WebSocket handshake
253 bool ForWebSocketHandshake() const; 256 bool ForWebSocketHandshake() const;
254 257
255 // Debug helper. 258 // Debug helper.
256 static std::string DescribeState(State state); 259 static std::string DescribeState(State state);
257 260
258 void SetStream(HttpStream* stream); 261 void SetStream(HttpStream* stream);
259 262
263 void CopyConnectionAttemptsFromStreamRequest();
264
260 scoped_refptr<HttpAuthController> 265 scoped_refptr<HttpAuthController>
261 auth_controllers_[HttpAuth::AUTH_NUM_TARGETS]; 266 auth_controllers_[HttpAuth::AUTH_NUM_TARGETS];
262 267
263 // Whether this transaction is waiting for proxy auth, server auth, or is 268 // Whether this transaction is waiting for proxy auth, server auth, or is
264 // not waiting for any auth at all. |pending_auth_target_| is read and 269 // not waiting for any auth at all. |pending_auth_target_| is read and
265 // cleared by RestartWithAuth(). 270 // cleared by RestartWithAuth().
266 HttpAuth::Target pending_auth_target_; 271 HttpAuth::Target pending_auth_target_;
267 272
268 CompletionCallback io_callback_; 273 CompletionCallback io_callback_;
269 CompletionCallback callback_; 274 CompletionCallback callback_;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 bool establishing_tunnel_; 325 bool establishing_tunnel_;
321 326
322 // The helper object to use to create WebSocketHandshakeStreamBase 327 // The helper object to use to create WebSocketHandshakeStreamBase
323 // objects. Only relevant when establishing a WebSocket connection. 328 // objects. Only relevant when establishing a WebSocket connection.
324 WebSocketHandshakeStreamBase::CreateHelper* 329 WebSocketHandshakeStreamBase::CreateHelper*
325 websocket_handshake_stream_base_create_helper_; 330 websocket_handshake_stream_base_create_helper_;
326 331
327 BeforeNetworkStartCallback before_network_start_callback_; 332 BeforeNetworkStartCallback before_network_start_callback_;
328 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_; 333 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_;
329 334
335 ConnectionAttempts connection_attempts_;
336
330 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); 337 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction);
331 }; 338 };
332 339
333 } // namespace net 340 } // namespace net
334 341
335 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ 342 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
OLDNEW
« no previous file with comments | « net/http/http_cache_transaction.cc ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698