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

Unified Diff: net/spdy/spdy_session.cc

Issue 8990001: base::Bind: Convert most of net/http. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clang. Created 9 years 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/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 54a182727ffaa6d66afd5ba73db1f4378fbccf3e..ca8b79ec7c1286ab58229324a57ac41ece526a07 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -300,6 +300,10 @@ SpdySession::SpdySession(const HostPortProxyPair& host_port_proxy_pair,
SendSettings();
}
+SpdySession::PendingCreateStream::~PendingCreateStream() {}
+
+SpdySession::CallbackResultPair::~CallbackResultPair() {}
+
SpdySession::~SpdySession() {
if (state_ != CLOSED) {
state_ = CLOSED;
@@ -400,7 +404,7 @@ int SpdySession::CreateStream(
RequestPriority priority,
scoped_refptr<SpdyStream>* spdy_stream,
const BoundNetLog& stream_net_log,
- OldCompletionCallback* callback) {
+ const CompletionCallback& callback) {
if (!max_concurrent_streams_ ||
active_streams_.size() < max_concurrent_streams_) {
return CreateStreamImpl(url, priority, spdy_stream, stream_net_log);
@@ -890,7 +894,7 @@ void SpdySession::CloseAllStreams(net::Error status) {
while (!create_stream_queues_[i].empty()) {
PendingCreateStream pending_create = create_stream_queues_[i].front();
create_stream_queues_[i].pop();
- pending_create.callback->Run(ERR_ABORTED);
+ pending_create.callback.Run(ERR_ABORTED);
}
}
@@ -1763,10 +1767,10 @@ void SpdySession::InvokeUserStreamCreationCallback(
if (it == pending_callback_map_.end())
return;
- OldCompletionCallback* callback = it->second.callback;
+ CompletionCallback callback = it->second.callback;
int result = it->second.result;
pending_callback_map_.erase(it);
- callback->Run(result);
+ callback.Run(result);
}
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698