diff options
author | agayev@chromium.org <agayev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-18 21:47:35 +0000 |
---|---|---|
committer | agayev@chromium.org <agayev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-18 21:47:35 +0000 |
commit | eaf10dc5d0fd4d093bb92445207dc9e0679222c7 (patch) | |
tree | 0d9235fab4b03b1098f7f6a18928b85c059b7a91 /net/udp | |
parent | 8d779bd5a0776a415297e6068a1eed904e31dff9 (diff) | |
download | chromium_src-eaf10dc5d0fd4d093bb92445207dc9e0679222c7.zip chromium_src-eaf10dc5d0fd4d093bb92445207dc9e0679222c7.tar.gz chromium_src-eaf10dc5d0fd4d093bb92445207dc9e0679222c7.tar.bz2 |
DatagramSocket: added NetLog accessor.
BUG=60149
TEST=None
Review URL: http://codereview.chromium.org/7395033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92904 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/udp')
-rw-r--r-- | net/udp/datagram_socket.h | 4 | ||||
-rw-r--r-- | net/udp/udp_client_socket.cc | 4 | ||||
-rw-r--r-- | net/udp/udp_client_socket.h | 1 | ||||
-rw-r--r-- | net/udp/udp_server_socket.cc | 4 | ||||
-rw-r--r-- | net/udp/udp_server_socket.h | 1 | ||||
-rw-r--r-- | net/udp/udp_socket_libevent.h | 2 | ||||
-rw-r--r-- | net/udp/udp_socket_win.h | 2 |
7 files changed, 18 insertions, 0 deletions
diff --git a/net/udp/datagram_socket.h b/net/udp/datagram_socket.h index 65bc5d6..514df6e 100644 --- a/net/udp/datagram_socket.h +++ b/net/udp/datagram_socket.h @@ -10,6 +10,7 @@ namespace net { +class BoundNetLog; class IPEndPoint; // A datagram socket is an interface to a protocol which exchanges @@ -33,6 +34,9 @@ class NET_TEST DatagramSocket { // Copy the local udp address into |address| and return a network error code. // (similar to getsockname) virtual int GetLocalAddress(IPEndPoint* address) const = 0; + + // Gets the NetLog for this socket. + virtual const BoundNetLog& NetLog() const = 0; }; } // namespace net diff --git a/net/udp/udp_client_socket.cc b/net/udp/udp_client_socket.cc index 8df1fca..32fc50b 100644 --- a/net/udp/udp_client_socket.cc +++ b/net/udp/udp_client_socket.cc @@ -54,4 +54,8 @@ bool UDPClientSocket::SetSendBufferSize(int32 size) { return true; } +const BoundNetLog& UDPClientSocket::NetLog() const { + return socket_.NetLog(); +} + } // namespace net diff --git a/net/udp/udp_client_socket.h b/net/udp/udp_client_socket.h index b26393c..64b17dca 100644 --- a/net/udp/udp_client_socket.h +++ b/net/udp/udp_client_socket.h @@ -33,6 +33,7 @@ class NET_TEST UDPClientSocket : public DatagramClientSocket { virtual int GetLocalAddress(IPEndPoint* address) const; virtual bool SetReceiveBufferSize(int32 size); virtual bool SetSendBufferSize(int32 size); + virtual const BoundNetLog& NetLog() const; private: UDPSocket socket_; diff --git a/net/udp/udp_server_socket.cc b/net/udp/udp_server_socket.cc index 31df603..80b831f 100644 --- a/net/udp/udp_server_socket.cc +++ b/net/udp/udp_server_socket.cc @@ -49,4 +49,8 @@ int UDPServerSocket::GetLocalAddress(IPEndPoint* address) const { return socket_.GetLocalAddress(address); } +const BoundNetLog& UDPServerSocket::NetLog() const { + return socket_.NetLog(); +} + } // namespace net diff --git a/net/udp/udp_server_socket.h b/net/udp/udp_server_socket.h index 300899e..643949e 100644 --- a/net/udp/udp_server_socket.h +++ b/net/udp/udp_server_socket.h @@ -35,6 +35,7 @@ class NET_API UDPServerSocket : public DatagramServerSocket { virtual void Close(); virtual int GetPeerAddress(IPEndPoint* address) const; virtual int GetLocalAddress(IPEndPoint* address) const; + virtual const BoundNetLog& NetLog() const; private: UDPSocket socket_; diff --git a/net/udp/udp_socket_libevent.h b/net/udp/udp_socket_libevent.h index 6efaf49..a078150 100644 --- a/net/udp/udp_socket_libevent.h +++ b/net/udp/udp_socket_libevent.h @@ -97,6 +97,8 @@ class UDPSocketLibevent : public base::NonThreadSafe { // Returns true if the socket is already connected or bound. bool is_connected() const { return socket_ != kInvalidSocket; } + const BoundNetLog& NetLog() const { return net_log_; } + private: static const int kInvalidSocket = -1; diff --git a/net/udp/udp_socket_win.h b/net/udp/udp_socket_win.h index 01d5855..2dc818a 100644 --- a/net/udp/udp_socket_win.h +++ b/net/udp/udp_socket_win.h @@ -99,6 +99,8 @@ class UDPSocketWin : public base::NonThreadSafe { // Returns true if the socket is already connected or bound. bool is_connected() const { return socket_ != INVALID_SOCKET; } + const BoundNetLog& NetLog() const { return net_log_; } + private: class ReadDelegate : public base::win::ObjectWatcher::Delegate { public: |