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 #include "net/http/http_network_session.h" | 5 #include "net/http/http_network_session.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 : ClientSocketFactory::GetDefaultFactory(), | 50 : ClientSocketFactory::GetDefaultFactory(), |
51 params.host_resolver, params.cert_verifier, params.channel_id_service, | 51 params.host_resolver, params.cert_verifier, params.channel_id_service, |
52 params.transport_security_state, params.cert_transparency_verifier, | 52 params.transport_security_state, params.cert_transparency_verifier, |
53 params.cert_policy_enforcer, ssl_session_cache_shard, | 53 params.cert_policy_enforcer, ssl_session_cache_shard, |
54 params.ssl_config_service, pool_type); | 54 params.ssl_config_service, pool_type); |
55 } | 55 } |
56 | 56 |
57 } // unnamed namespace | 57 } // unnamed namespace |
58 | 58 |
59 // The maximum receive window sizes for HTTP/2 sessions and streams. | 59 // The maximum receive window sizes for HTTP/2 sessions and streams. |
60 const int32 kSpdySessionMaxRecvWindowSize = 15 * 1024 * 1024; // 15 MB | 60 const int32_t kSpdySessionMaxRecvWindowSize = 15 * 1024 * 1024; // 15 MB |
61 const int32 kSpdyStreamMaxRecvWindowSize = 6 * 1024 * 1024; // 6 MB | 61 const int32_t kSpdyStreamMaxRecvWindowSize = 6 * 1024 * 1024; // 6 MB |
62 // QUIC's socket receive buffer size. | 62 // QUIC's socket receive buffer size. |
63 // We should adaptively set this buffer size, but for now, we'll use a size | 63 // We should adaptively set this buffer size, but for now, we'll use a size |
64 // that seems large enough to receive data at line rate for most connections, | 64 // that seems large enough to receive data at line rate for most connections, |
65 // and does not consume "too much" memory. | 65 // and does not consume "too much" memory. |
66 const int32 kQuicSocketReceiveBufferSize = 1024 * 1024; // 1MB | 66 const int32_t kQuicSocketReceiveBufferSize = 1024 * 1024; // 1MB |
67 | 67 |
68 // Number of recent connections to consider for certain thresholds | 68 // Number of recent connections to consider for certain thresholds |
69 // that trigger disabling QUIC. E.g. disable QUIC if PUBLIC_RESET was | 69 // that trigger disabling QUIC. E.g. disable QUIC if PUBLIC_RESET was |
70 // received post handshake for at least 2 of 20 recent connections. | 70 // received post handshake for at least 2 of 20 recent connections. |
71 const int32 kQuicMaxRecentDisabledReasons = 20; | 71 const int32_t kQuicMaxRecentDisabledReasons = 20; |
72 | 72 |
73 HttpNetworkSession::Params::Params() | 73 HttpNetworkSession::Params::Params() |
74 : client_socket_factory(NULL), | 74 : client_socket_factory(NULL), |
75 host_resolver(NULL), | 75 host_resolver(NULL), |
76 cert_verifier(NULL), | 76 cert_verifier(NULL), |
77 cert_policy_enforcer(NULL), | 77 cert_policy_enforcer(NULL), |
78 channel_id_service(NULL), | 78 channel_id_service(NULL), |
79 transport_security_state(NULL), | 79 transport_security_state(NULL), |
80 cert_transparency_verifier(NULL), | 80 cert_transparency_verifier(NULL), |
81 proxy_service(NULL), | 81 proxy_service(NULL), |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 case WEBSOCKET_SOCKET_POOL: | 364 case WEBSOCKET_SOCKET_POOL: |
365 return websocket_socket_pool_manager_.get(); | 365 return websocket_socket_pool_manager_.get(); |
366 default: | 366 default: |
367 NOTREACHED(); | 367 NOTREACHED(); |
368 break; | 368 break; |
369 } | 369 } |
370 return NULL; | 370 return NULL; |
371 } | 371 } |
372 | 372 |
373 } // namespace net | 373 } // namespace net |
OLD | NEW |