| 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 <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 TEST_F(DnsSessionTest, HistogramTimeoutLong) { | 242 TEST_F(DnsSessionTest, HistogramTimeoutLong) { |
| 243 config_.timeout = base::TimeDelta::FromSeconds(15); | 243 config_.timeout = base::TimeDelta::FromSeconds(15); |
| 244 Initialize(2); | 244 Initialize(2); |
| 245 base::TimeDelta timeout = session_->NextTimeout(0, 0); | 245 base::TimeDelta timeout = session_->NextTimeout(0, 0); |
| 246 EXPECT_EQ(timeout.InMilliseconds(), config_.timeout.InMilliseconds()); | 246 EXPECT_EQ(timeout.InMilliseconds(), config_.timeout.InMilliseconds()); |
| 247 } | 247 } |
| 248 | 248 |
| 249 } // namespace | 249 } // namespace |
| 250 | 250 |
| 251 } // namespace net | 251 } // namespace net |
| OLD | NEW |