| Index: trunk/src/net/spdy/spdy_session_pool.cc
|
| ===================================================================
|
| --- trunk/src/net/spdy/spdy_session_pool.cc (revision 274100)
|
| +++ trunk/src/net/spdy/spdy_session_pool.cc (working copy)
|
| @@ -71,12 +71,6 @@
|
| SpdySessionPool::~SpdySessionPool() {
|
| CloseAllSessions();
|
|
|
| - while (!sessions_.empty()) {
|
| - // Destroy sessions to enforce that lifetime is scoped to SpdySessionPool.
|
| - // Write callbacks queued upon session drain are not invoked.
|
| - RemoveUnavailableSession((*sessions_.begin())->GetWeakPtr());
|
| - }
|
| -
|
| if (ssl_config_service_.get())
|
| ssl_config_service_->RemoveObserver(this);
|
| NetworkChangeNotifier::RemoveIPAddressObserver(this);
|
| @@ -250,7 +244,7 @@
|
| }
|
|
|
| void SpdySessionPool::CloseAllSessions() {
|
| - while (!available_sessions_.empty()) {
|
| + while (!sessions_.empty()) {
|
| CloseCurrentSessionsHelper(ERR_ABORTED, "Closing all sessions.",
|
| false /* idle_only */);
|
| }
|
| @@ -286,7 +280,7 @@
|
| #else
|
| (*it)->CloseSessionOnError(ERR_NETWORK_CHANGED,
|
| "Closing current sessions.");
|
| - DCHECK((*it)->IsDraining());
|
| + DCHECK(!*it);
|
| #endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_IOS)
|
| DCHECK(!IsSessionAvailable(*it));
|
| }
|
| @@ -395,6 +389,7 @@
|
|
|
| (*it)->CloseSessionOnError(error, description);
|
| DCHECK(!IsSessionAvailable(*it));
|
| + DCHECK(!*it);
|
| }
|
| }
|
|
|
|
|