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

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

Issue 10386048: Decouple DevTools from socket implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update 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
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 #ifndef NET_BASE_TCP_LISTEN_SOCKET_H_ 5 #ifndef NET_BASE_TCP_LISTEN_SOCKET_H_
6 #define NET_BASE_TCP_LISTEN_SOCKET_H_ 6 #define NET_BASE_TCP_LISTEN_SOCKET_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 static SOCKET CreateAndBind(const std::string& ip, int port); 33 static SOCKET CreateAndBind(const std::string& ip, int port);
34 34
35 // Implements StreamListenSocket::Accept. 35 // Implements StreamListenSocket::Accept.
36 virtual void Accept() OVERRIDE; 36 virtual void Accept() OVERRIDE;
37 37
38 private: 38 private:
39 DISALLOW_COPY_AND_ASSIGN(TCPListenSocket); 39 DISALLOW_COPY_AND_ASSIGN(TCPListenSocket);
40 }; 40 };
41 41
42 // Factory that can be used to instantiate TCPListenSocket.
43 class TCPListenSocketFactory : public StreamListenSocketFactory {
44 public:
pfeldman 2012/05/14 11:12:00 space before public.
Philippe 2012/05/14 12:36:52 Done.
45 TCPListenSocketFactory(const std::string& ip, int port);
46 virtual ~TCPListenSocketFactory();
47
48 // Returns a new instance of TCPListenSocket created through
pfeldman 2012/05/14 11:12:00 Should be // StreamListenSocketFactory overrides
Philippe 2012/05/14 12:36:52 Done.
49 // TCPListenSocket::CreateAndListen().
50 virtual scoped_refptr<StreamListenSocket> CreateAndListen(
51 StreamListenSocket::Delegate* delegate) OVERRIDE;
52
53 private:
54 const std::string ip_;
pfeldman 2012/05/14 11:12:00 DISALLOW_COPY_AND_ASSIGN is missing
Philippe 2012/05/14 12:36:52 I added it although there is nothing here that pre
mmenke 2012/05/14 20:45:19 Copying classes with inheritance scares me.
Philippe 2012/05/15 14:39:09 That's a good point.
55 const int port_;
56 };
57
42 } // namespace net 58 } // namespace net
43 59
44 #endif // NET_BASE_TCP_LISTEN_SOCKET_H_ 60 #endif // NET_BASE_TCP_LISTEN_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698