| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // A ClientSocketPoolBase is used to restrict the number of sockets open at | 5 // A ClientSocketPoolBase is used to restrict the number of sockets open at |
| 6 // a time. It also maintains a list of idle persistent sockets for reuse. | 6 // a time. It also maintains a list of idle persistent sockets for reuse. |
| 7 // Subclasses of ClientSocketPool should compose ClientSocketPoolBase to handle | 7 // Subclasses of ClientSocketPool should compose ClientSocketPoolBase to handle |
| 8 // the core logic of (1) restricting the number of active (connected or | 8 // the core logic of (1) restricting the number of active (connected or |
| 9 // connecting) sockets per "group" (generally speaking, the hostname), (2) | 9 // connecting) sockets per "group" (generally speaking, the hostname), (2) |
| 10 // maintaining a per-group list of idle, persistent sockets for reuse, and (3) | 10 // maintaining a per-group list of idle, persistent sockets for reuse, and (3) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include <list> | 27 #include <list> |
| 28 #include <map> | 28 #include <map> |
| 29 #include <set> | 29 #include <set> |
| 30 #include <string> | 30 #include <string> |
| 31 #include <vector> | 31 #include <vector> |
| 32 | 32 |
| 33 #include "base/basictypes.h" | 33 #include "base/basictypes.h" |
| 34 #include "base/memory/ref_counted.h" | 34 #include "base/memory/ref_counted.h" |
| 35 #include "base/memory/scoped_ptr.h" | 35 #include "base/memory/scoped_ptr.h" |
| 36 #include "base/memory/weak_ptr.h" | 36 #include "base/memory/weak_ptr.h" |
| 37 #include "base/task.h" | |
| 38 #include "base/time.h" | 37 #include "base/time.h" |
| 39 #include "base/timer.h" | 38 #include "base/timer.h" |
| 40 #include "net/base/address_list.h" | 39 #include "net/base/address_list.h" |
| 41 #include "net/base/completion_callback.h" | 40 #include "net/base/completion_callback.h" |
| 42 #include "net/base/load_states.h" | 41 #include "net/base/load_states.h" |
| 43 #include "net/base/net_errors.h" | 42 #include "net/base/net_errors.h" |
| 44 #include "net/base/net_export.h" | 43 #include "net/base/net_export.h" |
| 45 #include "net/base/net_log.h" | 44 #include "net/base/net_log.h" |
| 46 #include "net/base/network_change_notifier.h" | 45 #include "net/base/network_change_notifier.h" |
| 47 #include "net/base/request_priority.h" | 46 #include "net/base/request_priority.h" |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 // Histograms for the pool | 805 // Histograms for the pool |
| 807 ClientSocketPoolHistograms* const histograms_; | 806 ClientSocketPoolHistograms* const histograms_; |
| 808 internal::ClientSocketPoolBaseHelper helper_; | 807 internal::ClientSocketPoolBaseHelper helper_; |
| 809 | 808 |
| 810 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase); | 809 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase); |
| 811 }; | 810 }; |
| 812 | 811 |
| 813 } // namespace net | 812 } // namespace net |
| 814 | 813 |
| 815 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_BASE_H_ | 814 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_BASE_H_ |
| OLD | NEW |