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

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

Issue 2595413002: Race preconnects to HTTP2 proxies that support alternate proxies
Patch Set: Rebased, rch comments Created 3 years, 11 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) 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_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 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // Enable support for Token Binding. 200 // Enable support for Token Binding.
201 bool enable_token_binding; 201 bool enable_token_binding;
202 202
203 // Enable HTTP/0.9 for HTTP/HTTPS on ports other than the default one for 203 // Enable HTTP/0.9 for HTTP/HTTPS on ports other than the default one for
204 // each protocol. 204 // each protocol.
205 bool http_09_on_non_default_ports_enabled; 205 bool http_09_on_non_default_ports_enabled;
206 206
207 // If true, only one pending preconnect is allowed to proxies that support 207 // If true, only one pending preconnect is allowed to proxies that support
208 // request priorities. 208 // request priorities.
209 bool restrict_to_one_preconnect_for_proxies; 209 bool restrict_to_one_preconnect_for_proxies;
210 // If true, preconnect jobs to HTTP2 proxies are raced with an alternative
211 // job if the proxy supports an alternative proxy.
212 bool race_preconnects_to_http2_proxies;
210 }; 213 };
211 214
212 enum SocketPoolType { 215 enum SocketPoolType {
213 NORMAL_SOCKET_POOL, 216 NORMAL_SOCKET_POOL,
214 WEBSOCKET_SOCKET_POOL, 217 WEBSOCKET_SOCKET_POOL,
215 NUM_SOCKET_POOL_TYPES 218 NUM_SOCKET_POOL_TYPES
216 }; 219 };
217 220
218 explicit HttpNetworkSession(const Params& params); 221 explicit HttpNetworkSession(const Params& params);
219 ~HttpNetworkSession() override; 222 ~HttpNetworkSession() override;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 298
296 // Dumps memory allocation stats. |parent_dump_absolute_name| is the name 299 // Dumps memory allocation stats. |parent_dump_absolute_name| is the name
297 // used by the parent MemoryAllocatorDump in the memory dump hierarchy. 300 // used by the parent MemoryAllocatorDump in the memory dump hierarchy.
298 void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd, 301 void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd,
299 const std::string& parent_absolute_name) const; 302 const std::string& parent_absolute_name) const;
300 303
301 // Evaluates if QUIC is enabled for new streams. 304 // Evaluates if QUIC is enabled for new streams.
302 bool IsQuicEnabled() const; 305 bool IsQuicEnabled() const;
303 306
304 // Disable QUIC for new streams. 307 // Disable QUIC for new streams.
305 void DisableQuic(); 308 void DisableQuic();
Ryan Hamilton 2017/01/24 19:36:59 nit: it's best to upload Rebase patch sets indepen
306 309
307 private: 310 private:
308 friend class HttpNetworkSessionPeer; 311 friend class HttpNetworkSessionPeer;
309 312
310 ClientSocketPoolManager* GetSocketPoolManager(SocketPoolType pool_type); 313 ClientSocketPoolManager* GetSocketPoolManager(SocketPoolType pool_type);
311 314
312 // Flush sockets on low memory notifications callback. 315 // Flush sockets on low memory notifications callback.
313 void OnMemoryPressure( 316 void OnMemoryPressure(
314 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); 317 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level);
315 318
(...skipping 25 matching lines...) Expand all
341 NextProtoVector next_protos_; 344 NextProtoVector next_protos_;
342 345
343 Params params_; 346 Params params_;
344 347
345 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; 348 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_;
346 }; 349 };
347 350
348 } // namespace net 351 } // namespace net
349 352
350 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ 353 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698