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

Side by Side Diff: net/base/tcp_listen_socket.cc

Issue 10386048: Decouple DevTools from socket implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/tcp_listen_socket.h ('k') | net/server/http_connection.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "net/base/tcp_listen_socket.h" 5 #include "net/base/tcp_listen_socket.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 // winsock2.h must be included first in order to ensure it is included before 8 // winsock2.h must be included first in order to ensure it is included before
9 // windows.h. 9 // windows.h.
10 #include <winsock2.h> 10 #include <winsock2.h>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return; 81 return;
82 scoped_refptr<TCPListenSocket> sock( 82 scoped_refptr<TCPListenSocket> sock(
83 new TCPListenSocket(conn, socket_delegate_)); 83 new TCPListenSocket(conn, socket_delegate_));
84 // It's up to the delegate to AddRef if it wants to keep it around. 84 // It's up to the delegate to AddRef if it wants to keep it around.
85 #if defined(OS_POSIX) 85 #if defined(OS_POSIX)
86 sock->WatchSocket(WAITING_READ); 86 sock->WatchSocket(WAITING_READ);
87 #endif 87 #endif
88 socket_delegate_->DidAccept(this, sock); 88 socket_delegate_->DidAccept(this, sock);
89 } 89 }
90 90
91 TCPListenSocketFactory::TCPListenSocketFactory(const string& ip, int port)
92 : ip_(ip),
93 port_(port) {
94 }
95
96 TCPListenSocketFactory::~TCPListenSocketFactory() {}
97
98 scoped_refptr<StreamListenSocket> TCPListenSocketFactory::CreateAndListen(
99 StreamListenSocket::Delegate* delegate) const {
100 return TCPListenSocket::CreateAndListen(ip_, port_, delegate);
101 }
102
91 } // namespace net 103 } // namespace net
OLDNEW
« no previous file with comments | « net/base/tcp_listen_socket.h ('k') | net/server/http_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698