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

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

Issue 2533063002: Fix Net.Socket.IdleSocketTimeSaving histogram (Closed)
Patch Set: self review Created 4 years 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_proxy_client_socket_pool.cc ('k') | net/socket/client_socket_handle.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 (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_stream_factory_impl.h" 5 #include "net/http/http_stream_factory_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ptr_util.h" 16 #include "base/memory/ptr_util.h"
17 #include "base/run_loop.h" 17 #include "base/run_loop.h"
18 #include "net/base/load_timing_info.h"
18 #include "net/base/port_util.h" 19 #include "net/base/port_util.h"
19 #include "net/base/test_completion_callback.h" 20 #include "net/base/test_completion_callback.h"
20 #include "net/base/test_proxy_delegate.h" 21 #include "net/base/test_proxy_delegate.h"
21 #include "net/cert/ct_policy_enforcer.h" 22 #include "net/cert/ct_policy_enforcer.h"
22 #include "net/cert/mock_cert_verifier.h" 23 #include "net/cert/mock_cert_verifier.h"
23 #include "net/cert/multi_log_ct_verifier.h" 24 #include "net/cert/multi_log_ct_verifier.h"
24 #include "net/dns/mock_host_resolver.h" 25 #include "net/dns/mock_host_resolver.h"
25 #include "net/http/bidirectional_stream_impl.h" 26 #include "net/http/bidirectional_stream_impl.h"
26 #include "net/http/bidirectional_stream_request_info.h" 27 #include "net/http/bidirectional_stream_request_info.h"
27 #include "net/http/http_auth_handler_factory.h" 28 #include "net/http/http_auth_handler_factory.h"
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 const void* socket_params, 402 const void* socket_params,
402 int num_sockets, 403 int num_sockets,
403 const NetLogWithSource& net_log) override { 404 const NetLogWithSource& net_log) override {
404 last_num_streams_ = num_sockets; 405 last_num_streams_ = num_sockets;
405 } 406 }
406 407
407 void CancelRequest(const std::string& group_name, 408 void CancelRequest(const std::string& group_name,
408 ClientSocketHandle* handle) override { 409 ClientSocketHandle* handle) override {
409 ADD_FAILURE(); 410 ADD_FAILURE();
410 } 411 }
411 void ReleaseSocket(const std::string& group_name, 412 void ReleaseSocket(
412 std::unique_ptr<StreamSocket> socket, 413 const std::string& group_name,
413 int id) override { 414 std::unique_ptr<StreamSocket> socket,
415 int id,
416 const LoadTimingInfo::ConnectTiming& connect_timing) override {
414 ADD_FAILURE(); 417 ADD_FAILURE();
415 } 418 }
416 void CloseIdleSockets() override { ADD_FAILURE(); } 419 void CloseIdleSockets() override { ADD_FAILURE(); }
417 int IdleSocketCount() const override { 420 int IdleSocketCount() const override {
418 ADD_FAILURE(); 421 ADD_FAILURE();
419 return 0; 422 return 0;
420 } 423 }
421 int IdleSocketCountInGroup(const std::string& group_name) const override { 424 int IdleSocketCountInGroup(const std::string& group_name) const override {
422 ADD_FAILURE(); 425 ADD_FAILURE();
423 return 0; 426 return 0;
(...skipping 1843 matching lines...) Expand 10 before | Expand all | Expand 10 after
2267 session->GetTransportSocketPool( 2270 session->GetTransportSocketPool(
2268 HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); 2271 HttpNetworkSession::WEBSOCKET_SOCKET_POOL)));
2269 EXPECT_EQ(1, GetSocketPoolGroupCount( 2272 EXPECT_EQ(1, GetSocketPoolGroupCount(
2270 session->GetSSLSocketPool(HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); 2273 session->GetSSLSocketPool(HttpNetworkSession::WEBSOCKET_SOCKET_POOL)));
2271 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); 2274 EXPECT_TRUE(waiter.used_proxy_info().is_direct());
2272 } 2275 }
2273 2276
2274 } // namespace 2277 } // namespace
2275 2278
2276 } // namespace net 2279 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket_pool.cc ('k') | net/socket/client_socket_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698