OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/logging.h" | 7 #include "base/logging.h" |
8 #include "net/base/client_socket_factory.h" | 8 #include "net/base/client_socket_factory.h" |
9 #include "net/http/http_network_session.h" | 9 #include "net/http/http_network_session.h" |
10 #include "net/http/http_network_transaction.h" | 10 #include "net/http/http_network_transaction.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 void HttpNetworkLayer::Suspend(bool suspend) { | 59 void HttpNetworkLayer::Suspend(bool suspend) { |
60 suspended_ = suspend; | 60 suspended_ = suspend; |
61 | 61 |
62 if (suspend && session_) | 62 if (suspend && session_) |
63 session_->connection_pool()->CloseIdleSockets(); | 63 session_->connection_pool()->CloseIdleSockets(); |
64 } | 64 } |
65 | 65 |
66 HttpNetworkSession* HttpNetworkLayer::GetSession() { | 66 HttpNetworkSession* HttpNetworkLayer::GetSession() { |
67 if (!session_) { | 67 if (!session_) { |
68 DCHECK(proxy_service_); | 68 DCHECK(proxy_service_); |
69 session_ = new HttpNetworkSession(proxy_service_, | 69 session_ = new HttpNetworkSession(proxy_service_); |
70 ClientSocketFactory::GetDefaultFactory()); | |
71 } | 70 } |
72 return session_; | 71 return session_; |
73 } | 72 } |
74 | 73 |
75 } // namespace net | 74 } // namespace net |
OLD | NEW |