OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 PPAPI_PROXY_UDP_SOCKET_FILTER_H_ | 5 #ifndef PPAPI_PROXY_UDP_SOCKET_FILTER_H_ |
6 #define PPAPI_PROXY_UDP_SOCKET_FILTER_H_ | 6 #define PPAPI_PROXY_UDP_SOCKET_FILTER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
| 11 #include <memory> |
11 #include <queue> | 12 #include <queue> |
12 #include <string> | 13 #include <string> |
13 | 14 |
14 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
15 #include "base/containers/scoped_ptr_hash_map.h" | 16 #include "base/containers/scoped_ptr_hash_map.h" |
16 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
17 #include "ppapi/c/ppb_udp_socket.h" | 18 #include "ppapi/c/ppb_udp_socket.h" |
18 #include "ppapi/c/private/ppb_net_address_private.h" | 19 #include "ppapi/c/private/ppb_net_address_private.h" |
19 #include "ppapi/proxy/plugin_resource.h" | 20 #include "ppapi/proxy/plugin_resource.h" |
20 #include "ppapi/proxy/ppapi_proxy_export.h" | 21 #include "ppapi/proxy/ppapi_proxy_export.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 int32_t result, | 124 int32_t result, |
124 const std::string& data, | 125 const std::string& data, |
125 const PP_NetAddress_Private& addr); | 126 const PP_NetAddress_Private& addr); |
126 | 127 |
127 // lock_ protects queues_. | 128 // lock_ protects queues_. |
128 // | 129 // |
129 // Lock order (if >1 acquired): | 130 // Lock order (if >1 acquired): |
130 // 1 ppapi::ProxyLock | 131 // 1 ppapi::ProxyLock |
131 // \-->2 Filter lock_ | 132 // \-->2 Filter lock_ |
132 mutable base::Lock lock_; | 133 mutable base::Lock lock_; |
133 base::ScopedPtrHashMap<PP_Resource, scoped_ptr<RecvQueue>> queues_; | 134 base::ScopedPtrHashMap<PP_Resource, std::unique_ptr<RecvQueue>> queues_; |
134 }; | 135 }; |
135 | 136 |
136 } // namespace proxy | 137 } // namespace proxy |
137 } // namespace ppapi | 138 } // namespace ppapi |
138 | 139 |
139 #endif // PPAPI_PROXY_UDP_SOCKET_FILTER_H_ | 140 #endif // PPAPI_PROXY_UDP_SOCKET_FILTER_H_ |
OLD | NEW |