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

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

Issue 1027693004: Delete the ClientSocketPoolHistograms class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: small xml fix Created 5 years, 9 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 | « no previous file | net/http/http_proxy_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 563
564 typedef CaptureGroupNameSocketPool<TransportClientSocketPool> 564 typedef CaptureGroupNameSocketPool<TransportClientSocketPool>
565 CaptureGroupNameTransportSocketPool; 565 CaptureGroupNameTransportSocketPool;
566 typedef CaptureGroupNameSocketPool<HttpProxyClientSocketPool> 566 typedef CaptureGroupNameSocketPool<HttpProxyClientSocketPool>
567 CaptureGroupNameHttpProxySocketPool; 567 CaptureGroupNameHttpProxySocketPool;
568 typedef CaptureGroupNameSocketPool<SOCKSClientSocketPool> 568 typedef CaptureGroupNameSocketPool<SOCKSClientSocketPool>
569 CaptureGroupNameSOCKSSocketPool; 569 CaptureGroupNameSOCKSSocketPool;
570 typedef CaptureGroupNameSocketPool<SSLClientSocketPool> 570 typedef CaptureGroupNameSocketPool<SSLClientSocketPool>
571 CaptureGroupNameSSLSocketPool; 571 CaptureGroupNameSSLSocketPool;
572 572
573 template<typename ParentPool> 573 template <typename ParentPool>
574 CaptureGroupNameSocketPool<ParentPool>::CaptureGroupNameSocketPool( 574 CaptureGroupNameSocketPool<ParentPool>::CaptureGroupNameSocketPool(
575 HostResolver* host_resolver, 575 HostResolver* host_resolver,
576 CertVerifier* /* cert_verifier */) 576 CertVerifier* /* cert_verifier */)
577 : ParentPool(0, 0, NULL, host_resolver, NULL, NULL) {} 577 : ParentPool(0, 0, host_resolver, NULL, NULL) {
578 }
578 579
579 template <> 580 template <>
580 CaptureGroupNameHttpProxySocketPool::CaptureGroupNameSocketPool( 581 CaptureGroupNameHttpProxySocketPool::CaptureGroupNameSocketPool(
581 HostResolver* /* host_resolver */, 582 HostResolver* /* host_resolver */,
582 CertVerifier* /* cert_verifier */) 583 CertVerifier* /* cert_verifier */)
583 : HttpProxyClientSocketPool(0, 0, NULL, NULL, NULL, NULL) { 584 : HttpProxyClientSocketPool(0, 0, NULL, NULL, NULL) {
584 } 585 }
585 586
586 template <> 587 template <>
587 CaptureGroupNameSSLSocketPool::CaptureGroupNameSocketPool( 588 CaptureGroupNameSSLSocketPool::CaptureGroupNameSocketPool(
588 HostResolver* /* host_resolver */, 589 HostResolver* /* host_resolver */,
589 CertVerifier* cert_verifier) 590 CertVerifier* cert_verifier)
590 : SSLClientSocketPool(0, 591 : SSLClientSocketPool(0,
591 0, 592 0,
592 NULL,
593 cert_verifier, 593 cert_verifier,
594 NULL, 594 NULL,
595 NULL, 595 NULL,
596 NULL, 596 NULL,
597 NULL, 597 NULL,
598 std::string(), 598 std::string(),
599 NULL, 599 NULL,
600 NULL, 600 NULL,
601 NULL, 601 NULL,
602 NULL, 602 NULL,
(...skipping 9538 matching lines...) Expand 10 before | Expand all | Expand 10 after
10141 request.method = "GET"; 10141 request.method = "GET";
10142 request.url = origin; 10142 request.url = origin;
10143 request.load_flags = 0; 10143 request.load_flags = 0;
10144 10144
10145 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 10145 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
10146 10146
10147 // Use a TCP Socket Pool with only one connection per group. This is used 10147 // Use a TCP Socket Pool with only one connection per group. This is used
10148 // to validate that the TCP socket is not released to the pool between 10148 // to validate that the TCP socket is not released to the pool between
10149 // each round of multi-round authentication. 10149 // each round of multi-round authentication.
10150 HttpNetworkSessionPeer session_peer(session); 10150 HttpNetworkSessionPeer session_peer(session);
10151 ClientSocketPoolHistograms transport_pool_histograms("SmallTCP");
10152 TransportClientSocketPool* transport_pool = new TransportClientSocketPool( 10151 TransportClientSocketPool* transport_pool = new TransportClientSocketPool(
10153 50, // Max sockets for pool 10152 50, // Max sockets for pool
10154 1, // Max sockets per group 10153 1, // Max sockets per group
10155 &transport_pool_histograms,
10156 session_deps_.host_resolver.get(), 10154 session_deps_.host_resolver.get(),
10157 session_deps_.socket_factory.get(), 10155 session_deps_.socket_factory.get(),
10158 session_deps_.net_log); 10156 session_deps_.net_log);
10159 scoped_ptr<MockClientSocketPoolManager> mock_pool_manager( 10157 scoped_ptr<MockClientSocketPoolManager> mock_pool_manager(
10160 new MockClientSocketPoolManager); 10158 new MockClientSocketPoolManager);
10161 mock_pool_manager->SetTransportSocketPool(transport_pool); 10159 mock_pool_manager->SetTransportSocketPool(transport_pool);
10162 session_peer.SetClientSocketPoolManager(mock_pool_manager.Pass()); 10160 session_peer.SetClientSocketPoolManager(mock_pool_manager.Pass());
10163 10161
10164 scoped_ptr<HttpTransaction> trans( 10162 scoped_ptr<HttpTransaction> trans(
10165 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 10163 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
(...skipping 3671 matching lines...) Expand 10 before | Expand all | Expand 10 after
13837 ASSERT_TRUE(response); 13835 ASSERT_TRUE(response);
13838 ASSERT_TRUE(response->headers.get()); 13836 ASSERT_TRUE(response->headers.get());
13839 13837
13840 EXPECT_EQ(101, response->headers->response_code()); 13838 EXPECT_EQ(101, response->headers->response_code());
13841 13839
13842 trans.reset(); 13840 trans.reset();
13843 session->CloseAllConnections(); 13841 session->CloseAllConnections();
13844 } 13842 }
13845 13843
13846 } // namespace net 13844 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/http/http_proxy_client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698