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