| 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 #ifndef NET_SOCKET_CLIENT_SOCKET_HANDLE_H_ | 5 #ifndef NET_SOCKET_CLIENT_SOCKET_HANDLE_H_ |
| 6 #define NET_SOCKET_CLIENT_SOCKET_HANDLE_H_ | 6 #define NET_SOCKET_CLIENT_SOCKET_HANDLE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // Adds a higher layered pool on top of the socket pool that |socket_| belongs | 110 // Adds a higher layered pool on top of the socket pool that |socket_| belongs |
| 111 // to. At most one higher layered pool can be added to a | 111 // to. At most one higher layered pool can be added to a |
| 112 // ClientSocketHandle at a time. On destruction or reset, automatically | 112 // ClientSocketHandle at a time. On destruction or reset, automatically |
| 113 // removes the higher pool if RemoveHigherLayeredPool has not been called. | 113 // removes the higher pool if RemoveHigherLayeredPool has not been called. |
| 114 void AddHigherLayeredPool(HigherLayeredPool* higher_pool); | 114 void AddHigherLayeredPool(HigherLayeredPool* higher_pool); |
| 115 | 115 |
| 116 // Removes a higher layered pool from the socket pool that |socket_| belongs | 116 // Removes a higher layered pool from the socket pool that |socket_| belongs |
| 117 // to. |higher_pool| must have been added by the above function. | 117 // to. |higher_pool| must have been added by the above function. |
| 118 void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool); | 118 void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool); |
| 119 | 119 |
| 120 // Closes idle sockets that are in the same group with |this|. |
| 121 void CloseIdleSocketsInGroup(); |
| 122 |
| 120 // Returns true when Init() has completed successfully. | 123 // Returns true when Init() has completed successfully. |
| 121 bool is_initialized() const { return is_initialized_; } | 124 bool is_initialized() const { return is_initialized_; } |
| 122 | 125 |
| 123 // Sets the portion of LoadTimingInfo related to connection establishment, and | 126 // Sets the portion of LoadTimingInfo related to connection establishment, and |
| 124 // the socket id. |is_reused| is needed because the handle may not have full | 127 // the socket id. |is_reused| is needed because the handle may not have full |
| 125 // reuse information. |load_timing_info| must have all default values when | 128 // reuse information. |load_timing_info| must have all default values when |
| 126 // called. Returns false and makes no changes to |load_timing_info| when | 129 // called. Returns false and makes no changes to |load_timing_info| when |
| 127 // |socket_| is NULL. | 130 // |socket_| is NULL. |
| 128 bool GetLoadTimingInfo(bool is_reused, | 131 bool GetLoadTimingInfo(bool is_reused, |
| 129 LoadTimingInfo* load_timing_info) const; | 132 LoadTimingInfo* load_timing_info) const; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 user_callback_ = callback; | 257 user_callback_ = callback; |
| 255 } else { | 258 } else { |
| 256 HandleInitCompletion(rv); | 259 HandleInitCompletion(rv); |
| 257 } | 260 } |
| 258 return rv; | 261 return rv; |
| 259 } | 262 } |
| 260 | 263 |
| 261 } // namespace net | 264 } // namespace net |
| 262 | 265 |
| 263 #endif // NET_SOCKET_CLIENT_SOCKET_HANDLE_H_ | 266 #endif // NET_SOCKET_CLIENT_SOCKET_HANDLE_H_ |
| OLD | NEW |