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

Unified Diff: net/tools/fetch/http_listen_socket.cc

Issue 10108015: Upstream changes making ListenSocket an abstract class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add listen_socket.cc. Created 8 years, 8 months 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 | « net/tools/fetch/http_listen_socket.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/fetch/http_listen_socket.cc
diff --git a/net/tools/fetch/http_listen_socket.cc b/net/tools/fetch/http_listen_socket.cc
index fc9f5f3e28614ce97ab59c2268147e4718c25467..92b6bd60e059d56e80e7296278dae3cd2bd2f5f1 100644
--- a/net/tools/fetch/http_listen_socket.cc
+++ b/net/tools/fetch/http_listen_socket.cc
@@ -16,7 +16,7 @@
// must run in the IO thread
HttpListenSocket::HttpListenSocket(SOCKET s,
HttpListenSocket::Delegate* delegate)
- : ALLOW_THIS_IN_INITIALIZER_LIST(net::ListenSocket(s, this)),
+ : ALLOW_THIS_IN_INITIALIZER_LIST(net::TCPListenSocket(s, this)),
delegate_(delegate) {
}
@@ -25,13 +25,13 @@ HttpListenSocket::~HttpListenSocket() {
}
void HttpListenSocket::Listen() {
- net::ListenSocket::Listen();
+ net::TCPListenSocket::Listen();
}
void HttpListenSocket::Accept() {
- SOCKET conn = net::ListenSocket::Accept(socket_);
- DCHECK_NE(conn, net::ListenSocket::kInvalidSocket);
- if (conn == net::ListenSocket::kInvalidSocket) {
+ SOCKET conn = net::TCPListenSocket::Accept(socket_);
+ DCHECK_NE(conn, net::TCPListenSocket::kInvalidSocket);
+ if (conn == net::TCPListenSocket::kInvalidSocket) {
// TODO
} else {
scoped_refptr<HttpListenSocket> sock(
@@ -45,8 +45,8 @@ HttpListenSocket* HttpListenSocket::Listen(
const std::string& ip,
int port,
HttpListenSocket::Delegate* delegate) {
- SOCKET s = net::ListenSocket::Listen(ip, port);
- if (s == net::ListenSocket::kInvalidSocket) {
+ SOCKET s = net::TCPListenSocket::CreateAndBind(ip, port);
+ if (s == net::TCPListenSocket::kInvalidSocket) {
// TODO (ibrar): error handling
} else {
HttpListenSocket *serv = new HttpListenSocket(s, delegate);
« no previous file with comments | « net/tools/fetch/http_listen_socket.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698