| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/spdy/spdy_session.h" | 5 #include "net/spdy/spdy_session.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/linked_ptr.h" | 9 #include "base/memory/linked_ptr.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 make_scoped_refptr( | 293 make_scoped_refptr( |
| 294 new NetLogSpdySessionParameter(host_port_proxy_pair_))); | 294 new NetLogSpdySessionParameter(host_port_proxy_pair_))); |
| 295 | 295 |
| 296 // TODO(mbelshe): consider randomization of the stream_hi_water_mark. | 296 // TODO(mbelshe): consider randomization of the stream_hi_water_mark. |
| 297 | 297 |
| 298 spdy_framer_.set_visitor(this); | 298 spdy_framer_.set_visitor(this); |
| 299 | 299 |
| 300 SendSettings(); | 300 SendSettings(); |
| 301 } | 301 } |
| 302 | 302 |
| 303 SpdySession::PendingCreateStream::~PendingCreateStream() {} |
| 304 |
| 305 SpdySession::CallbackResultPair::~CallbackResultPair() {} |
| 306 |
| 303 SpdySession::~SpdySession() { | 307 SpdySession::~SpdySession() { |
| 304 if (state_ != CLOSED) { | 308 if (state_ != CLOSED) { |
| 305 state_ = CLOSED; | 309 state_ = CLOSED; |
| 306 | 310 |
| 307 // Cleanup all the streams. | 311 // Cleanup all the streams. |
| 308 CloseAllStreams(net::ERR_ABORTED); | 312 CloseAllStreams(net::ERR_ABORTED); |
| 309 } | 313 } |
| 310 | 314 |
| 311 if (connection_->is_initialized()) { | 315 if (connection_->is_initialized()) { |
| 312 // With Spdy we can't recycle sockets. | 316 // With Spdy we can't recycle sockets. |
| (...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1763 if (it == pending_callback_map_.end()) | 1767 if (it == pending_callback_map_.end()) |
| 1764 return; | 1768 return; |
| 1765 | 1769 |
| 1766 CompletionCallback callback = it->second.callback; | 1770 CompletionCallback callback = it->second.callback; |
| 1767 int result = it->second.result; | 1771 int result = it->second.result; |
| 1768 pending_callback_map_.erase(it); | 1772 pending_callback_map_.erase(it); |
| 1769 callback.Run(result); | 1773 callback.Run(result); |
| 1770 } | 1774 } |
| 1771 | 1775 |
| 1772 } // namespace net | 1776 } // namespace net |
| OLD | NEW |