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

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

Issue 2910473005: Deprecate NonThreadSafe in net/ in favor of SequenceChecker/ThreadChecker. (Closed)
Patch Set: rebase on r476634 Created 3 years, 6 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/http/http_server_properties_impl.h » ('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 <inttypes.h> 7 #include <inttypes.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 http_server_properties_->SetMaxServerConfigsStoredInProperties( 238 http_server_properties_->SetMaxServerConfigsStoredInProperties(
239 params.quic_max_server_configs_stored_in_properties); 239 params.quic_max_server_configs_stored_in_properties);
240 240
241 memory_pressure_listener_.reset(new base::MemoryPressureListener(base::Bind( 241 memory_pressure_listener_.reset(new base::MemoryPressureListener(base::Bind(
242 &HttpNetworkSession::OnMemoryPressure, base::Unretained(this)))); 242 &HttpNetworkSession::OnMemoryPressure, base::Unretained(this))));
243 base::MemoryCoordinatorClientRegistry::GetInstance()->Register(this); 243 base::MemoryCoordinatorClientRegistry::GetInstance()->Register(this);
244 } 244 }
245 245
246 HttpNetworkSession::~HttpNetworkSession() { 246 HttpNetworkSession::~HttpNetworkSession() {
247 DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
247 response_drainers_.clear(); 248 response_drainers_.clear();
248 spdy_session_pool_.CloseAllSessions(); 249 spdy_session_pool_.CloseAllSessions();
249 base::MemoryCoordinatorClientRegistry::GetInstance()->Unregister(this); 250 base::MemoryCoordinatorClientRegistry::GetInstance()->Unregister(this);
250 } 251 }
251 252
252 void HttpNetworkSession::AddResponseDrainer( 253 void HttpNetworkSession::AddResponseDrainer(
253 std::unique_ptr<HttpResponseBodyDrainer> drainer) { 254 std::unique_ptr<HttpResponseBodyDrainer> drainer) {
254 DCHECK(!base::ContainsKey(response_drainers_, drainer.get())); 255 DCHECK(!base::ContainsKey(response_drainers_, drainer.get()));
255 HttpResponseBodyDrainer* drainer_ptr = drainer.get(); 256 HttpResponseBodyDrainer* drainer_ptr = drainer.get();
256 response_drainers_[drainer_ptr] = std::move(drainer); 257 response_drainers_[drainer_ptr] = std::move(drainer);
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 CloseIdleConnections(); 477 CloseIdleConnections();
477 break; 478 break;
478 } 479 }
479 } 480 }
480 481
481 void HttpNetworkSession::OnPurgeMemory() { 482 void HttpNetworkSession::OnPurgeMemory() {
482 CloseIdleConnections(); 483 CloseIdleConnections();
483 } 484 }
484 485
485 } // namespace net 486 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.h ('k') | net/http/http_server_properties_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698