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

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

Issue 2414883005: TEMP DO NOT LAND (Closed)
Patch Set: temp Created 4 years, 2 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/socket/client_socket_pool.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 <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 15 matching lines...) Expand all
26 #include "net/quic/core/quic_clock.h" 26 #include "net/quic/core/quic_clock.h"
27 #include "net/quic/core/quic_crypto_client_stream_factory.h" 27 #include "net/quic/core/quic_crypto_client_stream_factory.h"
28 #include "net/quic/core/quic_protocol.h" 28 #include "net/quic/core/quic_protocol.h"
29 #include "net/quic/core/quic_utils.h" 29 #include "net/quic/core/quic_utils.h"
30 #include "net/socket/client_socket_factory.h" 30 #include "net/socket/client_socket_factory.h"
31 #include "net/socket/client_socket_pool_manager_impl.h" 31 #include "net/socket/client_socket_pool_manager_impl.h"
32 #include "net/socket/next_proto.h" 32 #include "net/socket/next_proto.h"
33 #include "net/socket/ssl_client_socket.h" 33 #include "net/socket/ssl_client_socket.h"
34 #include "net/spdy/spdy_session_pool.h" 34 #include "net/spdy/spdy_session_pool.h"
35 35
36 #include "base/trace_event/memory_allocator_dump.h"
37 #include "base/trace_event/process_memory_dump.h"
38 #include "base/strings/stringprintf.h"
39
36 namespace net { 40 namespace net {
37 41
38 namespace { 42 namespace {
39 43
40 base::StaticAtomicSequenceNumber g_next_shard_id; 44 base::StaticAtomicSequenceNumber g_next_shard_id;
41 45
42 ClientSocketPoolManager* CreateSocketPoolManager( 46 ClientSocketPoolManager* CreateSocketPoolManager(
43 HttpNetworkSession::SocketPoolType pool_type, 47 HttpNetworkSession::SocketPoolType pool_type,
44 const HttpNetworkSession::Params& params, 48 const HttpNetworkSession::Params& params,
45 const std::string& ssl_session_cache_shard) { 49 const std::string& ssl_session_cache_shard) {
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 ssl_config_service_->GetSSLConfig(server_config); 372 ssl_config_service_->GetSSLConfig(server_config);
369 GetAlpnProtos(&server_config->alpn_protos); 373 GetAlpnProtos(&server_config->alpn_protos);
370 *proxy_config = *server_config; 374 *proxy_config = *server_config;
371 if (request.privacy_mode == PRIVACY_MODE_ENABLED) { 375 if (request.privacy_mode == PRIVACY_MODE_ENABLED) {
372 server_config->channel_id_enabled = false; 376 server_config->channel_id_enabled = false;
373 } else if (params_.enable_token_binding && params_.channel_id_service) { 377 } else if (params_.enable_token_binding && params_.channel_id_service) {
374 server_config->token_binding_params.push_back(TB_PARAM_ECDSAP256); 378 server_config->token_binding_params.push_back(TB_PARAM_ECDSAP256);
375 } 379 }
376 } 380 }
377 381
382 void HttpNetworkSession::PopulateAllocatorDump(
383 base::trace_event::MemoryAllocatorDump* dump) const {
ssid 2016/10/14 18:52:25 Maybe pass ProcessMemoryDump* here, with a root na
384 std::string name = base::StringPrintf("http_network_session_%p", this);
385 //base::trace_event::MemoryAllocatorDumpGuid guid(name);
386 base::trace_event::MemoryAllocatorDump* http_network_session_dump =
387 dump->process_memory_dump()->GetAllocatorDump(name);
388 if (http_network_session_dump != nullptr) {
389 dump->process_memory_dump()->AddOwnershipEdge(
390 dump->guid(), http_network_session_dump->guid());
391 return;
392 }
393 http_network_session_dump = dump->process_memory_dump()->CreateAllocatorDump(
394 name);
395 normal_socket_pool_manager_->PopulateAllocatorDump(http_network_session_dump);
ssid 2016/10/14 18:52:25 The code could be: name = root_name + "/http_requ
396 }
397
378 ClientSocketPoolManager* HttpNetworkSession::GetSocketPoolManager( 398 ClientSocketPoolManager* HttpNetworkSession::GetSocketPoolManager(
379 SocketPoolType pool_type) { 399 SocketPoolType pool_type) {
380 switch (pool_type) { 400 switch (pool_type) {
381 case NORMAL_SOCKET_POOL: 401 case NORMAL_SOCKET_POOL:
382 return normal_socket_pool_manager_.get(); 402 return normal_socket_pool_manager_.get();
383 case WEBSOCKET_SOCKET_POOL: 403 case WEBSOCKET_SOCKET_POOL:
384 return websocket_socket_pool_manager_.get(); 404 return websocket_socket_pool_manager_.get();
385 default: 405 default:
386 NOTREACHED(); 406 NOTREACHED();
387 break; 407 break;
(...skipping 25 matching lines...) Expand all
413 break; 433 break;
414 case base::MemoryState::SUSPENDED: 434 case base::MemoryState::SUSPENDED:
415 // Note: Not supported at present. Fall through. 435 // Note: Not supported at present. Fall through.
416 case base::MemoryState::UNKNOWN: 436 case base::MemoryState::UNKNOWN:
417 NOTREACHED(); 437 NOTREACHED();
418 break; 438 break;
419 } 439 }
420 } 440 }
421 441
422 } // namespace net 442 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.h ('k') | net/socket/client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698