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

Unified Diff: webrtc/base/physicalsocketserver.cc

Issue 2566953002: Delete unused class AsyncFile. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/physicalsocketserver.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/physicalsocketserver.cc
diff --git a/webrtc/base/physicalsocketserver.cc b/webrtc/base/physicalsocketserver.cc
index 2a48274fa08fcf08de259f75774f6c09ec6ad750..bf2f2c64f8ce7ea2d667a3dec178e01c315ef45b 100644
--- a/webrtc/base/physicalsocketserver.cc
+++ b/webrtc/base/physicalsocketserver.cc
@@ -1051,61 +1051,6 @@ class PosixSignalDispatcher : public Dispatcher {
PhysicalSocketServer *owner_;
};
-class FileDispatcher: public Dispatcher, public AsyncFile {
- public:
- FileDispatcher(int fd, PhysicalSocketServer *ss) : ss_(ss), fd_(fd) {
- set_readable(true);
-
- ss_->Add(this);
-
- fcntl(fd_, F_SETFL, fcntl(fd_, F_GETFL, 0) | O_NONBLOCK);
- }
-
- ~FileDispatcher() override {
- ss_->Remove(this);
- }
-
- SocketServer* socketserver() { return ss_; }
-
- int GetDescriptor() override { return fd_; }
-
- bool IsDescriptorClosed() override { return false; }
-
- uint32_t GetRequestedEvents() override { return flags_; }
-
- void OnPreEvent(uint32_t ff) override {}
-
- void OnEvent(uint32_t ff, int err) override {
- if ((ff & DE_READ) != 0)
- SignalReadEvent(this);
- if ((ff & DE_WRITE) != 0)
- SignalWriteEvent(this);
- if ((ff & DE_CLOSE) != 0)
- SignalCloseEvent(this, err);
- }
-
- bool readable() override { return (flags_ & DE_READ) != 0; }
-
- void set_readable(bool value) override {
- flags_ = value ? (flags_ | DE_READ) : (flags_ & ~DE_READ);
- }
-
- bool writable() override { return (flags_ & DE_WRITE) != 0; }
-
- void set_writable(bool value) override {
- flags_ = value ? (flags_ | DE_WRITE) : (flags_ & ~DE_WRITE);
- }
-
- private:
- PhysicalSocketServer* ss_;
- int fd_;
- int flags_;
-};
-
-AsyncFile* PhysicalSocketServer::CreateFile(int fd) {
- return new FileDispatcher(fd, this);
-}
-
#endif // WEBRTC_POSIX
#if defined(WEBRTC_WIN)
« no previous file with comments | « webrtc/base/physicalsocketserver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698