Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: net/http/http_network_layer.cc

Issue 113517: Revert "Revert "Revert "Add connected socket function to ClientSocketPool and ClientSocketHandle.""" (Closed)
Patch Set: Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/base/test_completion_callback.h ('k') | net/http/http_network_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « net/base/test_completion_callback.h ('k') | net/http/http_network_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698