Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1400)

Side by Side Diff: net/udp/udp_socket_libevent.h

Issue 8568021: Add OVERRIDE to net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: net only Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/tools/fetch/http_session.h ('k') | net/url_request/url_request_about_job.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_UDP_UDP_SOCKET_LIBEVENT_H_ 5 #ifndef NET_UDP_UDP_SOCKET_LIBEVENT_H_
6 #define NET_UDP_UDP_SOCKET_LIBEVENT_H_ 6 #define NET_UDP_UDP_SOCKET_LIBEVENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 private: 107 private:
108 static const int kInvalidSocket = -1; 108 static const int kInvalidSocket = -1;
109 109
110 class ReadWatcher : public MessageLoopForIO::Watcher { 110 class ReadWatcher : public MessageLoopForIO::Watcher {
111 public: 111 public:
112 explicit ReadWatcher(UDPSocketLibevent* socket) : socket_(socket) {} 112 explicit ReadWatcher(UDPSocketLibevent* socket) : socket_(socket) {}
113 113
114 // MessageLoopForIO::Watcher methods 114 // MessageLoopForIO::Watcher methods
115 115
116 virtual void OnFileCanReadWithoutBlocking(int /* fd */) { 116 virtual void OnFileCanReadWithoutBlocking(int /* fd */) OVERRIDE {
117 if (socket_->read_callback_) 117 if (socket_->read_callback_)
118 socket_->DidCompleteRead(); 118 socket_->DidCompleteRead();
119 } 119 }
120 120
121 virtual void OnFileCanWriteWithoutBlocking(int /* fd */) {} 121 virtual void OnFileCanWriteWithoutBlocking(int /* fd */) OVERRIDE {}
122 122
123 private: 123 private:
124 UDPSocketLibevent* const socket_; 124 UDPSocketLibevent* const socket_;
125 125
126 DISALLOW_COPY_AND_ASSIGN(ReadWatcher); 126 DISALLOW_COPY_AND_ASSIGN(ReadWatcher);
127 }; 127 };
128 128
129 class WriteWatcher : public MessageLoopForIO::Watcher { 129 class WriteWatcher : public MessageLoopForIO::Watcher {
130 public: 130 public:
131 explicit WriteWatcher(UDPSocketLibevent* socket) : socket_(socket) {} 131 explicit WriteWatcher(UDPSocketLibevent* socket) : socket_(socket) {}
132 132
133 // MessageLoopForIO::Watcher methods 133 // MessageLoopForIO::Watcher methods
134 134
135 virtual void OnFileCanReadWithoutBlocking(int /* fd */) {} 135 virtual void OnFileCanReadWithoutBlocking(int /* fd */) OVERRIDE {}
136 136
137 virtual void OnFileCanWriteWithoutBlocking(int /* fd */) { 137 virtual void OnFileCanWriteWithoutBlocking(int /* fd */) OVERRIDE {
138 if (socket_->write_callback_) 138 if (socket_->write_callback_)
139 socket_->DidCompleteWrite(); 139 socket_->DidCompleteWrite();
140 } 140 }
141 141
142 private: 142 private:
143 UDPSocketLibevent* const socket_; 143 UDPSocketLibevent* const socket_;
144 144
145 DISALLOW_COPY_AND_ASSIGN(WriteWatcher); 145 DISALLOW_COPY_AND_ASSIGN(WriteWatcher);
146 }; 146 };
147 147
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 OldCompletionCallback* write_callback_; 215 OldCompletionCallback* write_callback_;
216 216
217 BoundNetLog net_log_; 217 BoundNetLog net_log_;
218 218
219 DISALLOW_COPY_AND_ASSIGN(UDPSocketLibevent); 219 DISALLOW_COPY_AND_ASSIGN(UDPSocketLibevent);
220 }; 220 };
221 221
222 } // namespace net 222 } // namespace net
223 223
224 #endif // NET_UDP_UDP_SOCKET_LIBEVENT_H_ 224 #endif // NET_UDP_UDP_SOCKET_LIBEVENT_H_
OLDNEW
« no previous file with comments | « net/tools/fetch/http_session.h ('k') | net/url_request/url_request_about_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698