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

Side by Side Diff: net/http/http_network_session.cc

Issue 2340253002: Revert of Temporary: Detect WebSocket destruction order problem (Closed)
Patch Set: Created 4 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « net/http/http_network_session.h ('k') | net/websockets/websocket_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/http/http_network_session.h" 5 #include "net/http/http_network_session.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 http_server_properties_->SetMaxServerConfigsStoredInProperties( 249 http_server_properties_->SetMaxServerConfigsStoredInProperties(
250 params.quic_max_server_configs_stored_in_properties); 250 params.quic_max_server_configs_stored_in_properties);
251 251
252 memory_pressure_listener_.reset(new base::MemoryPressureListener(base::Bind( 252 memory_pressure_listener_.reset(new base::MemoryPressureListener(base::Bind(
253 &HttpNetworkSession::OnMemoryPressure, base::Unretained(this)))); 253 &HttpNetworkSession::OnMemoryPressure, base::Unretained(this))));
254 } 254 }
255 255
256 HttpNetworkSession::~HttpNetworkSession() { 256 HttpNetworkSession::~HttpNetworkSession() {
257 base::STLDeleteElements(&response_drainers_); 257 base::STLDeleteElements(&response_drainers_);
258 spdy_session_pool_.CloseAllSessions(); 258 spdy_session_pool_.CloseAllSessions();
259
260 // TODO(ricea): Remove this by October 2016. See bug 641013.
261 CHECK_EQ(active_websockets_, 0);
262 } 259 }
263 260
264 void HttpNetworkSession::AddResponseDrainer(HttpResponseBodyDrainer* drainer) { 261 void HttpNetworkSession::AddResponseDrainer(HttpResponseBodyDrainer* drainer) {
265 DCHECK(!base::ContainsKey(response_drainers_, drainer)); 262 DCHECK(!base::ContainsKey(response_drainers_, drainer));
266 response_drainers_.insert(drainer); 263 response_drainers_.insert(drainer);
267 } 264 }
268 265
269 void HttpNetworkSession::RemoveResponseDrainer( 266 void HttpNetworkSession::RemoveResponseDrainer(
270 HttpResponseBodyDrainer* drainer) { 267 HttpResponseBodyDrainer* drainer) {
271 DCHECK(base::ContainsKey(response_drainers_, drainer)); 268 DCHECK(base::ContainsKey(response_drainers_, drainer));
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE: 422 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE:
426 break; 423 break;
427 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE: 424 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE:
428 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL: 425 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL:
429 CloseIdleConnections(); 426 CloseIdleConnections();
430 break; 427 break;
431 } 428 }
432 } 429 }
433 430
434 } // namespace net 431 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.h ('k') | net/websockets/websocket_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698