| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_WEBSOCKET_ENDPOINT_LOCK_MANAGER_H_ | 5 #ifndef NET_SOCKET_WEBSOCKET_ENDPOINT_LOCK_MANAGER_H_ |
| 6 #define NET_SOCKET_WEBSOCKET_ENDPOINT_LOCK_MANAGER_H_ | 6 #define NET_SOCKET_WEBSOCKET_ENDPOINT_LOCK_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/containers/linked_list.h" | 10 #include "base/containers/linked_list.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 // Time to wait between a call to Unlock* and actually unlocking the socket. | 139 // Time to wait between a call to Unlock* and actually unlocking the socket. |
| 140 base::TimeDelta unlock_delay_; | 140 base::TimeDelta unlock_delay_; |
| 141 | 141 |
| 142 // Number of sockets currently pending unlock. | 142 // Number of sockets currently pending unlock. |
| 143 size_t pending_unlock_count_; | 143 size_t pending_unlock_count_; |
| 144 | 144 |
| 145 // The messsage loop holding the unlock delay callback may outlive this | 145 // The messsage loop holding the unlock delay callback may outlive this |
| 146 // object. | 146 // object. |
| 147 base::WeakPtrFactory<WebSocketEndpointLockManager> weak_factory_; | 147 base::WeakPtrFactory<WebSocketEndpointLockManager> weak_factory_; |
| 148 | 148 |
| 149 friend struct DefaultSingletonTraits<WebSocketEndpointLockManager>; | 149 friend struct base::DefaultSingletonTraits<WebSocketEndpointLockManager>; |
| 150 | 150 |
| 151 DISALLOW_COPY_AND_ASSIGN(WebSocketEndpointLockManager); | 151 DISALLOW_COPY_AND_ASSIGN(WebSocketEndpointLockManager); |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 } // namespace net | 154 } // namespace net |
| 155 | 155 |
| 156 #endif // NET_SOCKET_WEBSOCKET_ENDPOINT_LOCK_MANAGER_H_ | 156 #endif // NET_SOCKET_WEBSOCKET_ENDPOINT_LOCK_MANAGER_H_ |
| OLD | NEW |