| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // This object must be copyable to be placed in the map, but it cannot be | 97 // This object must be copyable to be placed in the map, but it cannot be |
| 98 // copied after |queue| has been assigned to. | 98 // copied after |queue| has been assigned to. |
| 99 LockInfo(const LockInfo& rhs); | 99 LockInfo(const LockInfo& rhs); |
| 100 | 100 |
| 101 // Not used. | 101 // Not used. |
| 102 LockInfo& operator=(const LockInfo& rhs); | 102 LockInfo& operator=(const LockInfo& rhs); |
| 103 | 103 |
| 104 // Must be NULL to copy this object into the map. Must be set to non-NULL | 104 // Must be NULL to copy this object into the map. Must be set to non-NULL |
| 105 // after the object is inserted into the map then point to the same list | 105 // after the object is inserted into the map then point to the same list |
| 106 // until this object is deleted. | 106 // until this object is deleted. |
| 107 scoped_ptr<WaiterQueue> queue; | 107 std::unique_ptr<WaiterQueue> queue; |
| 108 | 108 |
| 109 // This pointer is only used to identify the last instance of StreamSocket | 109 // This pointer is only used to identify the last instance of StreamSocket |
| 110 // that was passed to RememberSocket() for this endpoint. It should only be | 110 // that was passed to RememberSocket() for this endpoint. It should only be |
| 111 // compared with other pointers. It is never dereferenced and not owned. It | 111 // compared with other pointers. It is never dereferenced and not owned. It |
| 112 // is non-NULL if RememberSocket() has been called for this endpoint since | 112 // is non-NULL if RememberSocket() has been called for this endpoint since |
| 113 // the last call to UnlockSocket() or UnlockEndpoint(). | 113 // the last call to UnlockSocket() or UnlockEndpoint(). |
| 114 StreamSocket* socket; | 114 StreamSocket* socket; |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 // SocketLockInfoMap requires std::map iterator semantics for LockInfoMap | 117 // SocketLockInfoMap requires std::map iterator semantics for LockInfoMap |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 base::WeakPtrFactory<WebSocketEndpointLockManager> weak_factory_; | 149 base::WeakPtrFactory<WebSocketEndpointLockManager> weak_factory_; |
| 150 | 150 |
| 151 friend struct base::DefaultSingletonTraits<WebSocketEndpointLockManager>; | 151 friend struct base::DefaultSingletonTraits<WebSocketEndpointLockManager>; |
| 152 | 152 |
| 153 DISALLOW_COPY_AND_ASSIGN(WebSocketEndpointLockManager); | 153 DISALLOW_COPY_AND_ASSIGN(WebSocketEndpointLockManager); |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 } // namespace net | 156 } // namespace net |
| 157 | 157 |
| 158 #endif // NET_SOCKET_WEBSOCKET_ENDPOINT_LOCK_MANAGER_H_ | 158 #endif // NET_SOCKET_WEBSOCKET_ENDPOINT_LOCK_MANAGER_H_ |
| OLD | NEW |