| Index: chrome/browser/extensions/api/socket/udp_socket.h
|
| diff --git a/chrome/browser/extensions/api/socket/udp_socket.h b/chrome/browser/extensions/api/socket/udp_socket.h
|
| index 4cffa98b86414eced3efd12b558ff4c7454f74d1..c527e56515149c3051ae40566bb613816b937f35 100644
|
| --- a/chrome/browser/extensions/api/socket/udp_socket.h
|
| +++ b/chrome/browser/extensions/api/socket/udp_socket.h
|
| @@ -9,7 +9,7 @@
|
| #include <string>
|
|
|
| #include "chrome/browser/extensions/api/socket/socket.h"
|
| -#include "net/udp/datagram_client_socket.h"
|
| +#include "net/udp/udp_socket.h"
|
|
|
| namespace net {
|
| class Socket;
|
| @@ -21,30 +21,26 @@ class APIResourceEventNotifier;
|
|
|
| class UDPSocket : public Socket {
|
| public:
|
| - UDPSocket(const std::string& address, int port,
|
| - APIResourceEventNotifier* event_notifier);
|
| + explicit UDPSocket(APIResourceEventNotifier* event_notifier);
|
| virtual ~UDPSocket();
|
|
|
| - virtual bool IsValid() OVERRIDE;
|
| -
|
| - virtual int Connect() OVERRIDE;
|
| + virtual int Connect(const std::string& address, int port) OVERRIDE;
|
| virtual void Disconnect() OVERRIDE;
|
| -
|
| - static UDPSocket* CreateSocketForTesting(
|
| - net::DatagramClientSocket* datagram_client_socket,
|
| - const std::string& address, int port,
|
| - APIResourceEventNotifier* event_notifier);
|
| -
|
| - protected:
|
| - virtual net::Socket* socket() OVERRIDE;
|
| + virtual int Bind(const std::string& address, int port) OVERRIDE;
|
| + virtual int Read(scoped_refptr<net::IOBuffer> io_buffer,
|
| + int io_buffer_size) OVERRIDE;
|
| + virtual int Write(scoped_refptr<net::IOBuffer> io_buffer,
|
| + int bytes) OVERRIDE;
|
| + virtual int RecvFrom(scoped_refptr<net::IOBuffer> io_buffer,
|
| + int io_buffer_size,
|
| + net::IPEndPoint* address) OVERRIDE;
|
| + virtual int SendTo(scoped_refptr<net::IOBuffer> io_buffer,
|
| + int byte_count,
|
| + const std::string& address,
|
| + int port) OVERRIDE;
|
|
|
| private:
|
| - // Special constructor for testing.
|
| - UDPSocket(net::DatagramClientSocket* datagram_client_socket,
|
| - const std::string& address, int port,
|
| - APIResourceEventNotifier* event_notifier);
|
| -
|
| - scoped_ptr<net::DatagramClientSocket> socket_;
|
| + scoped_ptr<net::UDPSocket> socket_;
|
| };
|
|
|
| } // namespace extensions
|
|
|