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

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

Issue 1376473003: Notify NQE of TCP RTT values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorder initialization in constructor Created 4 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/http/http_network_session.cc ('k') | net/http/http_stream_factory_impl_unittest.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 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 <stdint.h> 9 #include <stdint.h>
10 #include <limits> 10 #include <limits>
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 CaptureGroupNameHttpProxySocketPool; 624 CaptureGroupNameHttpProxySocketPool;
625 typedef CaptureGroupNameSocketPool<SOCKSClientSocketPool> 625 typedef CaptureGroupNameSocketPool<SOCKSClientSocketPool>
626 CaptureGroupNameSOCKSSocketPool; 626 CaptureGroupNameSOCKSSocketPool;
627 typedef CaptureGroupNameSocketPool<SSLClientSocketPool> 627 typedef CaptureGroupNameSocketPool<SSLClientSocketPool>
628 CaptureGroupNameSSLSocketPool; 628 CaptureGroupNameSSLSocketPool;
629 629
630 template <typename ParentPool> 630 template <typename ParentPool>
631 CaptureGroupNameSocketPool<ParentPool>::CaptureGroupNameSocketPool( 631 CaptureGroupNameSocketPool<ParentPool>::CaptureGroupNameSocketPool(
632 HostResolver* host_resolver, 632 HostResolver* host_resolver,
633 CertVerifier* /* cert_verifier */) 633 CertVerifier* /* cert_verifier */)
634 : ParentPool(0, 0, host_resolver, NULL, NULL) { 634 : ParentPool(0, 0, host_resolver, NULL, NULL, NULL) {}
635 }
636 635
637 template <> 636 template <>
638 CaptureGroupNameHttpProxySocketPool::CaptureGroupNameSocketPool( 637 CaptureGroupNameHttpProxySocketPool::CaptureGroupNameSocketPool(
639 HostResolver* /* host_resolver */, 638 HostResolver* /* host_resolver */,
640 CertVerifier* /* cert_verifier */) 639 CertVerifier* /* cert_verifier */)
641 : HttpProxyClientSocketPool(0, 0, NULL, NULL, NULL) { 640 : HttpProxyClientSocketPool(0, 0, NULL, NULL, NULL) {
642 } 641 }
643 642
644 template <> 643 template <>
645 CaptureGroupNameSSLSocketPool::CaptureGroupNameSocketPool( 644 CaptureGroupNameSSLSocketPool::CaptureGroupNameSocketPool(
(...skipping 11021 matching lines...) Expand 10 before | Expand all | Expand 10 after
11667 11666
11668 scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 11667 scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
11669 11668
11670 // Use a TCP Socket Pool with only one connection per group. This is used 11669 // Use a TCP Socket Pool with only one connection per group. This is used
11671 // to validate that the TCP socket is not released to the pool between 11670 // to validate that the TCP socket is not released to the pool between
11672 // each round of multi-round authentication. 11671 // each round of multi-round authentication.
11673 HttpNetworkSessionPeer session_peer(session.get()); 11672 HttpNetworkSessionPeer session_peer(session.get());
11674 TransportClientSocketPool* transport_pool = new TransportClientSocketPool( 11673 TransportClientSocketPool* transport_pool = new TransportClientSocketPool(
11675 50, // Max sockets for pool 11674 50, // Max sockets for pool
11676 1, // Max sockets per group 11675 1, // Max sockets per group
11677 session_deps_.host_resolver.get(), 11676 session_deps_.host_resolver.get(), session_deps_.socket_factory.get(),
11678 session_deps_.socket_factory.get(), 11677 NULL, session_deps_.net_log);
11679 session_deps_.net_log);
11680 scoped_ptr<MockClientSocketPoolManager> mock_pool_manager( 11678 scoped_ptr<MockClientSocketPoolManager> mock_pool_manager(
11681 new MockClientSocketPoolManager); 11679 new MockClientSocketPoolManager);
11682 mock_pool_manager->SetTransportSocketPool(transport_pool); 11680 mock_pool_manager->SetTransportSocketPool(transport_pool);
11683 session_peer.SetClientSocketPoolManager(std::move(mock_pool_manager)); 11681 session_peer.SetClientSocketPoolManager(std::move(mock_pool_manager));
11684 11682
11685 scoped_ptr<HttpTransaction> trans( 11683 scoped_ptr<HttpTransaction> trans(
11686 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 11684 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
11687 TestCompletionCallback callback; 11685 TestCompletionCallback callback;
11688 11686
11689 const MockWrite kGet( 11687 const MockWrite kGet(
(...skipping 4281 matching lines...) Expand 10 before | Expand all | Expand 10 after
15971 base::MessageLoop::current()->RunUntilIdle(); 15969 base::MessageLoop::current()->RunUntilIdle();
15972 15970
15973 EXPECT_TRUE(trans.GetResponseInfo()->was_fetched_via_spdy); 15971 EXPECT_TRUE(trans.GetResponseInfo()->was_fetched_via_spdy);
15974 HttpRequestHeaders headers; 15972 HttpRequestHeaders headers;
15975 ASSERT_TRUE(trans.GetFullRequestHeaders(&headers)); 15973 ASSERT_TRUE(trans.GetFullRequestHeaders(&headers));
15976 EXPECT_TRUE(headers.HasHeader(HttpRequestHeaders::kTokenBinding)); 15974 EXPECT_TRUE(headers.HasHeader(HttpRequestHeaders::kTokenBinding));
15977 } 15975 }
15978 #endif // !defined(OS_IOS) 15976 #endif // !defined(OS_IOS)
15979 15977
15980 } // namespace net 15978 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698