summaryrefslogtreecommitdiffstats
path: root/net/udp
diff options
context:
space:
mode:
authorhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-09 22:27:31 +0000
committerhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-09 22:27:31 +0000
commit2a848e0e4d75cd9195d15ff955014397482f9faa (patch)
treec01833c6bbc8948df2f4e43983a69b8e38a4dc51 /net/udp
parentf5f12389d59defd2f4a8deb2db53fa13004f3e38 (diff)
downloadchromium_src-2a848e0e4d75cd9195d15ff955014397482f9faa.zip
chromium_src-2a848e0e4d75cd9195d15ff955014397482f9faa.tar.gz
chromium_src-2a848e0e4d75cd9195d15ff955014397482f9faa.tar.bz2
Clean-up inline members of nested classes (net/)
Due to a bug, the Clang-plugin style checker failed to warn about inline constructors, destructors, non-empty virtual methods, etc. for nested classes. The plugin has been fixed, and this patch is part of a clean-up of all the code that now causes the plugin to issue errors. BUG=139346 Review URL: https://chromiumcodereview.appspot.com/10854063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150917 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/udp')
-rw-r--r--net/udp/udp_socket_libevent.cc10
-rw-r--r--net/udp/udp_socket_libevent.h10
2 files changed, 12 insertions, 8 deletions
diff --git a/net/udp/udp_socket_libevent.cc b/net/udp/udp_socket_libevent.cc
index 3782db3..beb1dca 100644
--- a/net/udp/udp_socket_libevent.cc
+++ b/net/udp/udp_socket_libevent.cc
@@ -292,6 +292,16 @@ void UDPSocketLibevent::AllowBroadcast() {
socket_options_ |= SOCKET_OPTION_BROADCAST;
}
+void UDPSocketLibevent::ReadWatcher::OnFileCanReadWithoutBlocking(int) {
+ if (!socket_->read_callback_.is_null())
+ socket_->DidCompleteRead();
+}
+
+void UDPSocketLibevent::WriteWatcher::OnFileCanWriteWithoutBlocking(int) {
+ if (!socket_->write_callback_.is_null())
+ socket_->DidCompleteWrite();
+}
+
void UDPSocketLibevent::DoReadCallback(int rv) {
DCHECK_NE(rv, ERR_IO_PENDING);
DCHECK(!read_callback_.is_null());
diff --git a/net/udp/udp_socket_libevent.h b/net/udp/udp_socket_libevent.h
index 4d3cddd..ce8a0f2 100644
--- a/net/udp/udp_socket_libevent.h
+++ b/net/udp/udp_socket_libevent.h
@@ -127,10 +127,7 @@ class NET_EXPORT UDPSocketLibevent : public base::NonThreadSafe {
// MessageLoopForIO::Watcher methods
- virtual void OnFileCanReadWithoutBlocking(int /* fd */) OVERRIDE {
- if (!socket_->read_callback_.is_null())
- socket_->DidCompleteRead();
- }
+ virtual void OnFileCanReadWithoutBlocking(int /* fd */) OVERRIDE;
virtual void OnFileCanWriteWithoutBlocking(int /* fd */) OVERRIDE {}
@@ -148,10 +145,7 @@ class NET_EXPORT UDPSocketLibevent : public base::NonThreadSafe {
virtual void OnFileCanReadWithoutBlocking(int /* fd */) OVERRIDE {}
- virtual void OnFileCanWriteWithoutBlocking(int /* fd */) OVERRIDE {
- if (!socket_->write_callback_.is_null())
- socket_->DidCompleteWrite();
- }
+ virtual void OnFileCanWriteWithoutBlocking(int /* fd */) OVERRIDE;
private:
UDPSocketLibevent* const socket_;