OLD | NEW |
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 |
11 #include <map> | 11 #include <map> |
12 #include <memory> | 12 #include <memory> |
13 #include <set> | 13 #include <set> |
14 #include <string> | 14 #include <string> |
15 #include <unordered_set> | 15 #include <unordered_set> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "base/bind.h" | 18 #include "base/bind.h" |
19 #include "base/memory/memory_coordinator_client.h" | 19 #include "base/memory/memory_coordinator_client.h" |
20 #include "base/memory/memory_pressure_monitor.h" | 20 #include "base/memory/memory_pressure_monitor.h" |
21 #include "base/memory/ref_counted.h" | 21 #include "base/memory/ref_counted.h" |
22 #include "base/memory/weak_ptr.h" | 22 #include "base/memory/weak_ptr.h" |
23 #include "base/threading/non_thread_safe.h" | 23 #include "base/sequence_checker.h" |
24 #include "net/base/host_port_pair.h" | 24 #include "net/base/host_port_pair.h" |
25 #include "net/base/net_export.h" | 25 #include "net/base/net_export.h" |
26 #include "net/dns/host_resolver.h" | 26 #include "net/dns/host_resolver.h" |
27 #include "net/http/http_auth_cache.h" | 27 #include "net/http/http_auth_cache.h" |
28 #include "net/http/http_stream_factory.h" | 28 #include "net/http/http_stream_factory.h" |
29 #include "net/quic/chromium/quic_stream_factory.h" | 29 #include "net/quic/chromium/quic_stream_factory.h" |
30 #include "net/socket/next_proto.h" | 30 #include "net/socket/next_proto.h" |
31 #include "net/spdy/chromium/spdy_session_pool.h" | 31 #include "net/spdy/chromium/spdy_session_pool.h" |
32 #include "net/spdy/core/spdy_protocol.h" | 32 #include "net/spdy/core/spdy_protocol.h" |
33 #include "net/ssl/ssl_client_auth_cache.h" | 33 #include "net/ssl/ssl_client_auth_cache.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 class TransportClientSocketPool; | 66 class TransportClientSocketPool; |
67 class TransportSecurityState; | 67 class TransportSecurityState; |
68 | 68 |
69 // Specifies the maximum HPACK dynamic table size the server is allowed to set. | 69 // Specifies the maximum HPACK dynamic table size the server is allowed to set. |
70 const uint32_t kSpdyMaxHeaderTableSize = 64 * 1024; | 70 const uint32_t kSpdyMaxHeaderTableSize = 64 * 1024; |
71 | 71 |
72 // Specifies the maximum concurrent streams server could send (via push). | 72 // Specifies the maximum concurrent streams server could send (via push). |
73 const uint32_t kSpdyMaxConcurrentPushedStreams = 1000; | 73 const uint32_t kSpdyMaxConcurrentPushedStreams = 1000; |
74 | 74 |
75 // This class holds session objects used by HttpNetworkTransaction objects. | 75 // This class holds session objects used by HttpNetworkTransaction objects. |
76 class NET_EXPORT HttpNetworkSession | 76 class NET_EXPORT HttpNetworkSession : public base::MemoryCoordinatorClient { |
77 : NON_EXPORTED_BASE(public base::NonThreadSafe), | |
78 public base::MemoryCoordinatorClient { | |
79 public: | 77 public: |
80 struct NET_EXPORT Params { | 78 struct NET_EXPORT Params { |
81 Params(); | 79 Params(); |
82 Params(const Params& other); | 80 Params(const Params& other); |
83 ~Params(); | 81 ~Params(); |
84 | 82 |
85 ClientSocketFactory* client_socket_factory; | 83 ClientSocketFactory* client_socket_factory; |
86 HostResolver* host_resolver; | 84 HostResolver* host_resolver; |
87 CertVerifier* cert_verifier; | 85 CertVerifier* cert_verifier; |
88 bool enable_server_push_cancellation; | 86 bool enable_server_push_cancellation; |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 std::unique_ptr<HttpStreamFactory> http_stream_factory_for_websocket_; | 312 std::unique_ptr<HttpStreamFactory> http_stream_factory_for_websocket_; |
315 std::map<HttpResponseBodyDrainer*, std::unique_ptr<HttpResponseBodyDrainer>> | 313 std::map<HttpResponseBodyDrainer*, std::unique_ptr<HttpResponseBodyDrainer>> |
316 response_drainers_; | 314 response_drainers_; |
317 std::unique_ptr<NetworkThrottleManager> network_stream_throttler_; | 315 std::unique_ptr<NetworkThrottleManager> network_stream_throttler_; |
318 | 316 |
319 NextProtoVector next_protos_; | 317 NextProtoVector next_protos_; |
320 | 318 |
321 Params params_; | 319 Params params_; |
322 | 320 |
323 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; | 321 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
| 322 |
| 323 SEQUENCE_CHECKER(sequence_checker_); |
324 }; | 324 }; |
325 | 325 |
326 } // namespace net | 326 } // namespace net |
327 | 327 |
328 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ | 328 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ |
OLD | NEW |