| Index: chrome/browser/extensions/api/socket/socket.h
|
| diff --git a/chrome/browser/extensions/api/socket/socket.h b/chrome/browser/extensions/api/socket/socket.h
|
| index 6d9d02407622f3fe9debe944f9bc8b5a6f17fb68..951ce6749497b9d85ad8dc068f32b08e3bddf69a 100644
|
| --- a/chrome/browser/extensions/api/socket/socket.h
|
| +++ b/chrome/browser/extensions/api/socket/socket.h
|
| @@ -35,6 +35,11 @@ typedef base::Callback<
|
| // we need to manage it in the context of an extension.
|
| class Socket : public ApiResource {
|
| public:
|
| + enum SocketType {
|
| + TYPE_TCP,
|
| + TYPE_UDP,
|
| + };
|
| +
|
| virtual ~Socket();
|
| virtual void Connect(const std::string& address,
|
| int port,
|
| @@ -65,11 +70,12 @@ class Socket : public ApiResource {
|
| virtual bool SetNoDelay(bool no_delay);
|
|
|
| bool IsConnected();
|
| - virtual bool IsTCPSocket() = 0;
|
|
|
| virtual bool GetPeerAddress(net::IPEndPoint* address) = 0;
|
| virtual bool GetLocalAddress(net::IPEndPoint* address) = 0;
|
|
|
| + virtual SocketType GetSocketType() const = 0;
|
| +
|
| static bool StringAndPortToAddressList(const std::string& ip_address_str,
|
| int port,
|
| net::AddressList* address_list);
|
|
|