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

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

Issue 9433015: Add a force pipelining option to load flags. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use flag in session params Created 8 years, 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_SESSION_H_ 5 #ifndef NET_HTTP_HTTP_NETWORK_SESSION_H_
6 #define NET_HTTP_HTTP_NETWORK_SESSION_H_ 6 #define NET_HTTP_HTTP_NETWORK_SESSION_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 host_resolver(NULL), 55 host_resolver(NULL),
56 cert_verifier(NULL), 56 cert_verifier(NULL),
57 origin_bound_cert_service(NULL), 57 origin_bound_cert_service(NULL),
58 transport_security_state(NULL), 58 transport_security_state(NULL),
59 proxy_service(NULL), 59 proxy_service(NULL),
60 ssl_host_info_factory(NULL), 60 ssl_host_info_factory(NULL),
61 ssl_config_service(NULL), 61 ssl_config_service(NULL),
62 http_auth_handler_factory(NULL), 62 http_auth_handler_factory(NULL),
63 network_delegate(NULL), 63 network_delegate(NULL),
64 http_server_properties(NULL), 64 http_server_properties(NULL),
65 net_log(NULL) {} 65 net_log(NULL),
66 force_http_pipelining(false) {}
66 67
67 ClientSocketFactory* client_socket_factory; 68 ClientSocketFactory* client_socket_factory;
68 HostResolver* host_resolver; 69 HostResolver* host_resolver;
69 CertVerifier* cert_verifier; 70 CertVerifier* cert_verifier;
70 OriginBoundCertService* origin_bound_cert_service; 71 OriginBoundCertService* origin_bound_cert_service;
71 TransportSecurityState* transport_security_state; 72 TransportSecurityState* transport_security_state;
72 ProxyService* proxy_service; 73 ProxyService* proxy_service;
73 SSLHostInfoFactory* ssl_host_info_factory; 74 SSLHostInfoFactory* ssl_host_info_factory;
74 std::string ssl_session_cache_shard; 75 std::string ssl_session_cache_shard;
75 SSLConfigService* ssl_config_service; 76 SSLConfigService* ssl_config_service;
76 HttpAuthHandlerFactory* http_auth_handler_factory; 77 HttpAuthHandlerFactory* http_auth_handler_factory;
77 NetworkDelegate* network_delegate; 78 NetworkDelegate* network_delegate;
78 HttpServerProperties* http_server_properties; 79 HttpServerProperties* http_server_properties;
79 NetLog* net_log; 80 NetLog* net_log;
81 bool force_http_pipelining;
80 }; 82 };
81 83
82 explicit HttpNetworkSession(const Params& params); 84 explicit HttpNetworkSession(const Params& params);
83 85
84 HttpAuthCache* http_auth_cache() { return &http_auth_cache_; } 86 HttpAuthCache* http_auth_cache() { return &http_auth_cache_; }
85 SSLClientAuthCache* ssl_client_auth_cache() { 87 SSLClientAuthCache* ssl_client_auth_cache() {
86 return &ssl_client_auth_cache_; 88 return &ssl_client_auth_cache_;
87 } 89 }
88 90
89 void AddResponseDrainer(HttpResponseBodyDrainer* drainer); 91 void AddResponseDrainer(HttpResponseBodyDrainer* drainer);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // responsible for deleting the returned value. 133 // responsible for deleting the returned value.
132 base::Value* SocketPoolInfoToValue() const; 134 base::Value* SocketPoolInfoToValue() const;
133 135
134 // Creates a Value summary of the state of the SPDY sessions. The caller is 136 // Creates a Value summary of the state of the SPDY sessions. The caller is
135 // responsible for deleting the returned value. 137 // responsible for deleting the returned value.
136 base::Value* SpdySessionPoolInfoToValue() const; 138 base::Value* SpdySessionPoolInfoToValue() const;
137 139
138 void CloseAllConnections(); 140 void CloseAllConnections();
139 void CloseIdleConnections(); 141 void CloseIdleConnections();
140 142
143 bool force_http_pipelining() const { return force_http_pipelining_; }
144
145 // Returns the original Params used to construct this session.
146 Params params() const { return params_; }
mmenke 2012/03/01 16:50:30 Nit: const Params&
James Simonsen 2012/03/01 18:49:29 Done.
147
141 private: 148 private:
142 friend class base::RefCounted<HttpNetworkSession>; 149 friend class base::RefCounted<HttpNetworkSession>;
143 friend class HttpNetworkSessionPeer; 150 friend class HttpNetworkSessionPeer;
144 151
145 ~HttpNetworkSession(); 152 ~HttpNetworkSession();
146 153
147 NetLog* const net_log_; 154 NetLog* const net_log_;
148 NetworkDelegate* const network_delegate_; 155 NetworkDelegate* const network_delegate_;
149 HttpServerProperties* const http_server_properties_; 156 HttpServerProperties* const http_server_properties_;
150 CertVerifier* const cert_verifier_; 157 CertVerifier* const cert_verifier_;
151 HttpAuthHandlerFactory* const http_auth_handler_factory_; 158 HttpAuthHandlerFactory* const http_auth_handler_factory_;
159 bool force_http_pipelining_;
152 160
153 // Not const since it's modified by HttpNetworkSessionPeer for testing. 161 // Not const since it's modified by HttpNetworkSessionPeer for testing.
154 ProxyService* proxy_service_; 162 ProxyService* proxy_service_;
155 const scoped_refptr<SSLConfigService> ssl_config_service_; 163 const scoped_refptr<SSLConfigService> ssl_config_service_;
156 164
157 HttpAuthCache http_auth_cache_; 165 HttpAuthCache http_auth_cache_;
158 SSLClientAuthCache ssl_client_auth_cache_; 166 SSLClientAuthCache ssl_client_auth_cache_;
159 scoped_ptr<ClientSocketPoolManager> socket_pool_manager_; 167 scoped_ptr<ClientSocketPoolManager> socket_pool_manager_;
160 SpdySessionPool spdy_session_pool_; 168 SpdySessionPool spdy_session_pool_;
161 scoped_ptr<HttpStreamFactory> http_stream_factory_; 169 scoped_ptr<HttpStreamFactory> http_stream_factory_;
162 std::set<HttpResponseBodyDrainer*> response_drainers_; 170 std::set<HttpResponseBodyDrainer*> response_drainers_;
171
172 Params params_;
163 }; 173 };
164 174
165 } // namespace net 175 } // namespace net
166 176
167 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ 177 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698