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

Unified Diff: net/base/listen_socket.h

Issue 14068: Reverting 6911. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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 | « chrome/common/ipc_channel_posix.cc ('k') | net/base/listen_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/listen_socket.h
===================================================================
--- net/base/listen_socket.h (revision 6915)
+++ net/base/listen_socket.h (working copy)
@@ -11,7 +11,6 @@
#ifndef NET_BASE_SOCKET_H_
#define NET_BASE_SOCKET_H_
-#include <string>
#if defined(OS_WIN)
#include <winsock2.h>
#include "base/object_watcher.h"
@@ -19,6 +18,8 @@
#include "base/message_loop.h"
#include "net/base/net_util.h"
#include "net/base/net_errors.h"
+#include "third_party/libevent/event.h"
+#include "base/message_pump_libevent.h"
#endif
#include "base/basictypes.h"
@@ -34,7 +35,7 @@
#if defined(OS_WIN)
public base::ObjectWatcher::Delegate
#elif defined(OS_POSIX)
- public MessageLoopForIO::Watcher
+ public base::MessagePumpLibevent::Watcher
#endif
{
public:
@@ -79,11 +80,11 @@
NOT_WAITING = 0,
WAITING_ACCEPT = 1,
WAITING_READ = 3,
- WAITING_CLOSE = 4
+ WAITING_CLOSE = 4
};
- // Pass any value in case of Windows, because in Windows
- // we are not using state.
- void WatchSocket(WaitState state);
+ // Pass any value in case of Windows, because in Windows
+ // we are not using state.
+ void WatchSocket(WaitState state);
void UnwatchSocket();
#if defined(OS_WIN)
@@ -94,17 +95,17 @@
#elif defined(OS_POSIX)
WaitState wait_state_;
// The socket's libevent wrapper
- MessageLoopForIO::FileDescriptorWatcher watcher_;
+ scoped_ptr<event> event_;
// Called by MessagePumpLibevent when the socket is ready to do I/O
- void OnFileCanReadWithoutBlocking(int fd);
- void OnFileCanWriteWithoutBlocking(int fd);
+ void OnSocketReady(short flags);
#endif
- SOCKET socket_;
+ SOCKET socket_;
ListenSocketDelegate *socket_delegate_;
private:
DISALLOW_EVIL_CONSTRUCTORS(ListenSocket);
};
-#endif // NET_BASE_SOCKET_H_
+#endif // NET_BASE_SOCKET_H_
+
« no previous file with comments | « chrome/common/ipc_channel_posix.cc ('k') | net/base/listen_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698