Chromium Code Reviews| Index: extensions/browser/api/socket/udp_socket.h |
| diff --git a/extensions/browser/api/socket/udp_socket.h b/extensions/browser/api/socket/udp_socket.h |
| index 17a4117441c8eb98b11531b5a85a59f1a550ebc0..27c7a59f7548f9f2eacc9f9062b622c1963bc063 100644 |
| --- a/extensions/browser/api/socket/udp_socket.h |
| +++ b/extensions/browser/api/socket/udp_socket.h |
| @@ -39,6 +39,8 @@ class UDPSocket : public Socket { |
| bool IsBound(); |
| + virtual bool IsReusable(); |
| + |
| int JoinGroup(const std::string& address); |
| int LeaveGroup(const std::string& address); |
| @@ -85,6 +87,8 @@ class ResumableUDPSocket : public UDPSocket { |
| // Overriden from ApiResource |
| bool IsPersistent() const override; |
| + bool IsReusable() override; |
| + |
| const std::string& name() const { return name_; } |
| void set_name(const std::string& name) { name_ = name; } |
| @@ -97,6 +101,9 @@ class ResumableUDPSocket : public UDPSocket { |
| bool paused() const { return paused_; } |
| void set_paused(bool paused) { paused_ = paused; } |
| + bool allow_address_reuse() const { return allow_address_reuse_; } |
| + void set_allow_address_reuse(bool allow) { allow_address_reuse_ = allow; } |
| + |
| private: |
| friend class ApiResourceManager<ResumableUDPSocket>; |
| static const char* service_name() { return "ResumableUDPSocketManager"; } |
| @@ -111,6 +118,9 @@ class ResumableUDPSocket : public UDPSocket { |
| // Flag indicating whether a connected socket blocks its peer from sending |
| // more data - see sockets_udp.idl. |
| bool paused_; |
| + // Flag indicating whether the address can be bound by multiple sockets - see |
| + // sockets_udp.idl |
| + bool allow_address_reuse_; |
|
Reilly Grant (use Gerrit)
2016/09/29 06:55:55
Instead of adding this field to ResumableUDPSocket
srsudar
2016/09/29 19:32:58
Done.
|
| }; |
| } // namespace extensions |