OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/base/tcp_client_socket_pool.h" | 5 #include "net/base/tcp_client_socket_pool.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/field_trial.h" | 8 #include "base/field_trial.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
11 #include "base/stl_util-inl.h" | 11 #include "base/stl_util-inl.h" |
12 #include "net/base/client_socket_factory.h" | 12 #include "net/base/client_socket_factory.h" |
13 #include "net/base/client_socket_handle.h" | 13 #include "net/base/client_socket_handle.h" |
14 #include "net/base/dns_resolution_observer.h" | |
15 #include "net/base/net_errors.h" | 14 #include "net/base/net_errors.h" |
16 #include "net/base/tcp_client_socket.h" | 15 #include "net/base/tcp_client_socket.h" |
17 | 16 |
18 using base::TimeDelta; | 17 using base::TimeDelta; |
19 | 18 |
20 namespace { | 19 namespace { |
21 | 20 |
22 // The timeout value, in seconds, used to clean up idle sockets that can't be | 21 // The timeout value, in seconds, used to clean up idle sockets that can't be |
23 // reused. | 22 // reused. |
24 // | 23 // |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 | 413 |
415 // Delete group if no longer needed. | 414 // Delete group if no longer needed. |
416 if (group.active_socket_count == 0 && group.idle_sockets.empty()) { | 415 if (group.active_socket_count == 0 && group.idle_sockets.empty()) { |
417 CHECK(group.pending_requests.empty()); | 416 CHECK(group.pending_requests.empty()); |
418 CHECK(group.connecting_requests.empty()); | 417 CHECK(group.connecting_requests.empty()); |
419 group_map_.erase(i); | 418 group_map_.erase(i); |
420 } | 419 } |
421 } | 420 } |
422 | 421 |
423 } // namespace net | 422 } // namespace net |
OLD | NEW |