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

Unified Diff: net/flip/flip_session.cc

Issue 348066: Flip: FlipSessionPool changes. (Closed)
Patch Set: Windows build fix. Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: net/flip/flip_session.cc
diff --git a/net/flip/flip_session.cc b/net/flip/flip_session.cc
index 962124a00b0dc0c448b68f728ab0131c7f313f88..0f9ec73789d05e5631fda6e0238417938edd56a3 100644
--- a/net/flip/flip_session.cc
+++ b/net/flip/flip_session.cc
@@ -26,18 +26,9 @@
namespace net {
// static
-scoped_ptr<FlipSessionPool> FlipSession::session_pool_;
bool FlipSession::use_ssl_ = true;
int PrioritizedIOBuffer::order_ = 0;
-FlipSession* FlipSession::GetFlipSession(
- const HostResolver::RequestInfo& info,
- HttpNetworkSession* session) {
- if (!session_pool_.get())
- session_pool_.reset(new FlipSessionPool());
- return session_pool_->Get(info, session);
-}
-
FlipSession::FlipSession(std::string host, HttpNetworkSession* session)
: ALLOW_THIS_IN_INITIALIZER_LIST(
connect_callback_(this, &FlipSession::OnTCPConnect)),
@@ -71,8 +62,8 @@ FlipSession::~FlipSession() {
// With Flip we can't recycle sockets.
connection_.socket()->Disconnect();
}
- if (session_pool_.get())
- session_pool_->Remove(this);
+
+ session_->flip_session_pool()->Remove(this);
}
net::Error FlipSession::Connect(const std::string& group_name,
@@ -269,7 +260,7 @@ bool FlipSession::CancelStream(int id) {
return true;
}
-bool FlipSession::IsStreamActive(int id) {
+bool FlipSession::IsStreamActive(int id) const {
return active_streams_.find(id) != active_streams_.end();
}

Powered by Google App Engine
This is Rietveld 408576698