OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_layer.h" | 5 #include "net/http/http_network_layer.h" |
6 | 6 |
7 #include "base/field_trial.h" | 7 #include "base/field_trial.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "net/http/http_network_session.h" | 10 #include "net/http/http_network_session.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 session_(NULL), | 60 session_(NULL), |
61 spdy_session_pool_(NULL), | 61 spdy_session_pool_(NULL), |
62 http_auth_handler_factory_(http_auth_handler_factory), | 62 http_auth_handler_factory_(http_auth_handler_factory), |
63 network_delegate_(network_delegate), | 63 network_delegate_(network_delegate), |
64 net_log_(net_log), | 64 net_log_(net_log), |
65 suspended_(false) { | 65 suspended_(false) { |
66 DCHECK(proxy_service_); | 66 DCHECK(proxy_service_); |
67 DCHECK(ssl_config_service_.get()); | 67 DCHECK(ssl_config_service_.get()); |
68 } | 68 } |
69 | 69 |
| 70 HttpNetworkLayer::HttpNetworkLayer( |
| 71 ClientSocketFactory* socket_factory, |
| 72 HostResolver* host_resolver, |
| 73 ProxyService* proxy_service, |
| 74 SSLConfigService* ssl_config_service, |
| 75 SpdySessionPool* spdy_session_pool, |
| 76 HttpAuthHandlerFactory* http_auth_handler_factory, |
| 77 HttpNetworkDelegate* network_delegate, |
| 78 NetLog* net_log) |
| 79 : socket_factory_(socket_factory), |
| 80 host_resolver_(host_resolver), |
| 81 proxy_service_(proxy_service), |
| 82 ssl_config_service_(ssl_config_service), |
| 83 session_(NULL), |
| 84 spdy_session_pool_(spdy_session_pool), |
| 85 http_auth_handler_factory_(http_auth_handler_factory), |
| 86 network_delegate_(network_delegate), |
| 87 net_log_(net_log), |
| 88 suspended_(false) { |
| 89 DCHECK(proxy_service_); |
| 90 DCHECK(ssl_config_service_.get()); |
| 91 } |
| 92 |
70 HttpNetworkLayer::HttpNetworkLayer(HttpNetworkSession* session) | 93 HttpNetworkLayer::HttpNetworkLayer(HttpNetworkSession* session) |
71 : socket_factory_(ClientSocketFactory::GetDefaultFactory()), | 94 : socket_factory_(ClientSocketFactory::GetDefaultFactory()), |
72 ssl_config_service_(NULL), | 95 ssl_config_service_(NULL), |
73 session_(session), | 96 session_(session), |
74 spdy_session_pool_(session->spdy_session_pool()), | 97 spdy_session_pool_(session->spdy_session_pool()), |
75 http_auth_handler_factory_(NULL), | 98 http_auth_handler_factory_(NULL), |
76 network_delegate_(NULL), | 99 network_delegate_(NULL), |
77 net_log_(NULL), | 100 net_log_(NULL), |
78 suspended_(false) { | 101 suspended_(false) { |
79 DCHECK(session_.get()); | 102 DCHECK(session_.get()); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 } else if (option == kEnableFlowControl) { | 212 } else if (option == kEnableFlowControl) { |
190 SpdySession::SetFlowControl(true); | 213 SpdySession::SetFlowControl(true); |
191 } else if (option.empty() && it == spdy_options.begin()) { | 214 } else if (option.empty() && it == spdy_options.begin()) { |
192 continue; | 215 continue; |
193 } else { | 216 } else { |
194 LOG(DFATAL) << "Unrecognized spdy option: " << option; | 217 LOG(DFATAL) << "Unrecognized spdy option: " << option; |
195 } | 218 } |
196 } | 219 } |
197 } | 220 } |
198 } // namespace net | 221 } // namespace net |
OLD | NEW |