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

Side by Side Diff: net/socket/transport_client_socket_pool.cc

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to fix a merge conflict Created 5 years, 8 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/socket/ssl_client_socket_unittest.cc ('k') | net/spdy/spdy_header_block.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/socket/transport_client_socket_pool.h" 5 #include "net/socket/transport_client_socket_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 474
475 NetLogTcpClientSocketPoolRequestedSocket(net_log, casted_params); 475 NetLogTcpClientSocketPoolRequestedSocket(net_log, casted_params);
476 476
477 return base_.RequestSocket(group_name, *casted_params, priority, handle, 477 return base_.RequestSocket(group_name, *casted_params, priority, handle,
478 callback, net_log); 478 callback, net_log);
479 } 479 }
480 480
481 void TransportClientSocketPool::NetLogTcpClientSocketPoolRequestedSocket( 481 void TransportClientSocketPool::NetLogTcpClientSocketPoolRequestedSocket(
482 const BoundNetLog& net_log, 482 const BoundNetLog& net_log,
483 const scoped_refptr<TransportSocketParams>* casted_params) { 483 const scoped_refptr<TransportSocketParams>* casted_params) {
484 if (net_log.IsLogging()) { 484 if (net_log.GetCaptureMode().enabled()) {
485 // TODO(eroman): Split out the host and port parameters. 485 // TODO(eroman): Split out the host and port parameters.
486 net_log.AddEvent( 486 net_log.AddEvent(
487 NetLog::TYPE_TCP_CLIENT_SOCKET_POOL_REQUESTED_SOCKET, 487 NetLog::TYPE_TCP_CLIENT_SOCKET_POOL_REQUESTED_SOCKET,
488 CreateNetLogHostPortPairCallback( 488 CreateNetLogHostPortPairCallback(
489 &casted_params->get()->destination().host_port_pair())); 489 &casted_params->get()->destination().host_port_pair()));
490 } 490 }
491 } 491 }
492 492
493 void TransportClientSocketPool::RequestSockets( 493 void TransportClientSocketPool::RequestSockets(
494 const std::string& group_name, 494 const std::string& group_name,
495 const void* params, 495 const void* params,
496 int num_sockets, 496 int num_sockets,
497 const BoundNetLog& net_log) { 497 const BoundNetLog& net_log) {
498 const scoped_refptr<TransportSocketParams>* casted_params = 498 const scoped_refptr<TransportSocketParams>* casted_params =
499 static_cast<const scoped_refptr<TransportSocketParams>*>(params); 499 static_cast<const scoped_refptr<TransportSocketParams>*>(params);
500 500
501 if (net_log.IsLogging()) { 501 if (net_log.GetCaptureMode().enabled()) {
502 // TODO(eroman): Split out the host and port parameters. 502 // TODO(eroman): Split out the host and port parameters.
503 net_log.AddEvent( 503 net_log.AddEvent(
504 NetLog::TYPE_TCP_CLIENT_SOCKET_POOL_REQUESTED_SOCKETS, 504 NetLog::TYPE_TCP_CLIENT_SOCKET_POOL_REQUESTED_SOCKETS,
505 CreateNetLogHostPortPairCallback( 505 CreateNetLogHostPortPairCallback(
506 &casted_params->get()->destination().host_port_pair())); 506 &casted_params->get()->destination().host_port_pair()));
507 } 507 }
508 508
509 base_.RequestSockets(group_name, *casted_params, num_sockets, net_log); 509 base_.RequestSockets(group_name, *casted_params, num_sockets, net_log);
510 } 510 }
511 511
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 HigherLayeredPool* higher_pool) { 563 HigherLayeredPool* higher_pool) {
564 base_.AddHigherLayeredPool(higher_pool); 564 base_.AddHigherLayeredPool(higher_pool);
565 } 565 }
566 566
567 void TransportClientSocketPool::RemoveHigherLayeredPool( 567 void TransportClientSocketPool::RemoveHigherLayeredPool(
568 HigherLayeredPool* higher_pool) { 568 HigherLayeredPool* higher_pool) {
569 base_.RemoveHigherLayeredPool(higher_pool); 569 base_.RemoveHigherLayeredPool(higher_pool);
570 } 570 }
571 571
572 } // namespace net 572 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | net/spdy/spdy_header_block.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698