Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: net/socket/websocket_endpoint_lock_manager.h

Issue 1892323002: Change scoped_ptr to std::unique_ptr in //net/socket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « net/socket/unix_domain_server_socket_posix_unittest.cc ('k') | net/socket/websocket_transport_client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698