summaryrefslogtreecommitdiffstats
path: root/net/http/http_network_layer.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 01:03:10 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 01:03:10 +0000
commitd1eda9325775891900b0ed740b2faffbe522fc20 (patch)
treee34789a2b48016864d86674b22f84cf7da33fd61 /net/http/http_network_layer.cc
parentebca346eb646c5b714f4efb4f383cb538780f1ae (diff)
downloadchromium_src-d1eda9325775891900b0ed740b2faffbe522fc20.zip
chromium_src-d1eda9325775891900b0ed740b2faffbe522fc20.tar.gz
chromium_src-d1eda9325775891900b0ed740b2faffbe522fc20.tar.bz2
Flip: FlipSessionPool changes.
(1) Move it into the HttpNetworkSession so that HttpNetworkTransaction can access it. This is in anticipation of switching HTTP/HTTPS connections over to FLIP. (2) Add some more functionality to FlipSessionPool, allowing HttpNetworkTransactions to check for the existence of other, reusable FlipSessions. Review URL: http://codereview.chromium.org/348066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30909 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_layer.cc')
-rw-r--r--net/http/http_network_layer.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/http/http_network_layer.cc b/net/http/http_network_layer.cc
index 1857e52..74cd548 100644
--- a/net/http/http_network_layer.cc
+++ b/net/http/http_network_layer.cc
@@ -8,6 +8,7 @@
#include "net/flip/flip_framer.h"
#include "net/flip/flip_network_transaction.h"
#include "net/flip/flip_session.h"
+#include "net/flip/flip_session_pool.h"
#include "net/http/http_network_session.h"
#include "net/http/http_network_transaction.h"
#include "net/socket/client_socket_factory.h"
@@ -47,6 +48,7 @@ HttpNetworkLayer::HttpNetworkLayer(ClientSocketFactory* socket_factory,
proxy_service_(proxy_service),
ssl_config_service_(ssl_config_service),
session_(NULL),
+ flip_session_pool_(NULL),
suspended_(false) {
DCHECK(proxy_service_);
DCHECK(ssl_config_service_.get());
@@ -56,6 +58,7 @@ HttpNetworkLayer::HttpNetworkLayer(HttpNetworkSession* session)
: socket_factory_(ClientSocketFactory::GetDefaultFactory()),
ssl_config_service_(NULL),
session_(session),
+ flip_session_pool_(session->flip_session_pool()),
suspended_(false) {
DCHECK(session_.get());
}
@@ -88,8 +91,10 @@ void HttpNetworkLayer::Suspend(bool suspend) {
HttpNetworkSession* HttpNetworkLayer::GetSession() {
if (!session_) {
DCHECK(proxy_service_);
- session_ = new HttpNetworkSession(host_resolver_, proxy_service_,
- socket_factory_, ssl_config_service_);
+ FlipSessionPool* flip_pool = enable_flip_ ? new FlipSessionPool : NULL;
+ session_ = new HttpNetworkSession(
+ host_resolver_, proxy_service_, socket_factory_,
+ ssl_config_service_, flip_pool);
// These were just temps for lazy-initializing HttpNetworkSession.
host_resolver_ = NULL;
proxy_service_ = NULL;