OLD | NEW |
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/dns/dns_session.h" | 5 #include "net/dns/dns_session.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/rand_util.h" | 12 #include "base/rand_util.h" |
13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
14 #include "net/base/ip_address.h" | 14 #include "net/base/ip_address.h" |
15 #include "net/base/socket_performance_watcher.h" | |
16 #include "net/dns/dns_protocol.h" | 15 #include "net/dns/dns_protocol.h" |
17 #include "net/dns/dns_socket_pool.h" | 16 #include "net/dns/dns_socket_pool.h" |
18 #include "net/log/net_log.h" | 17 #include "net/log/net_log.h" |
| 18 #include "net/socket/socket_performance_watcher.h" |
19 #include "net/socket/socket_test_util.h" | 19 #include "net/socket/socket_test_util.h" |
20 #include "net/socket/ssl_client_socket.h" | 20 #include "net/socket/ssl_client_socket.h" |
21 #include "net/socket/stream_socket.h" | 21 #include "net/socket/stream_socket.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
24 namespace net { | 24 namespace net { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 class TestClientSocketFactory : public ClientSocketFactory { | 28 class TestClientSocketFactory : public ClientSocketFactory { |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 TEST_F(DnsSessionTest, HistogramTimeoutLong) { | 241 TEST_F(DnsSessionTest, HistogramTimeoutLong) { |
242 config_.timeout = base::TimeDelta::FromSeconds(15); | 242 config_.timeout = base::TimeDelta::FromSeconds(15); |
243 Initialize(2); | 243 Initialize(2); |
244 base::TimeDelta timeout = session_->NextTimeout(0, 0); | 244 base::TimeDelta timeout = session_->NextTimeout(0, 0); |
245 EXPECT_EQ(timeout.InMilliseconds(), config_.timeout.InMilliseconds()); | 245 EXPECT_EQ(timeout.InMilliseconds(), config_.timeout.InMilliseconds()); |
246 } | 246 } |
247 | 247 |
248 } // namespace | 248 } // namespace |
249 | 249 |
250 } // namespace net | 250 } // namespace net |
OLD | NEW |