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

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: Address Pavel's comments 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:
45 TCPListenSocketFactory(const std::string& ip, int port);
46 virtual ~TCPListenSocketFactory();
47
48 // StreamListenSocketFactory overrides.
49 virtual scoped_refptr<StreamListenSocket> CreateAndListen(
50 StreamListenSocket::Delegate* delegate) OVERRIDE;
51
52 private:
53 const std::string ip_;
54 const int port_;
55
56 DISALLOW_COPY_AND_ASSIGN(TCPListenSocketFactory);
57 };
58
42 } // namespace net 59 } // namespace net
43 60
44 #endif // NET_BASE_TCP_LISTEN_SOCKET_H_ 61 #endif // NET_BASE_TCP_LISTEN_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698