 Chromium Code Reviews
 Chromium Code Reviews Issue 11236025:
  Test that debug stub works with browser.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src/
    
  
    Issue 11236025:
  Test that debug stub works with browser.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src/| OLD | NEW | 
|---|---|
| 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 | 7 | 
| 8 #include <string> | 8 #include <string> | 
| 9 | 9 | 
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" | 
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" | 
| 12 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" | 
| 13 #include "net/base/stream_listen_socket.h" | 13 #include "net/base/stream_listen_socket.h" | 
| 14 | 14 | 
| 15 namespace net { | 15 namespace net { | 
| 16 | 16 | 
| 17 // Implements a TCP socket. Note that this is ref counted. | 17 // Implements a TCP socket. Note that this is ref counted. | 
| 18 class NET_EXPORT TCPListenSocket : public StreamListenSocket { | 18 class NET_EXPORT TCPListenSocket : public StreamListenSocket { | 
| 19 public: | 19 public: | 
| 20 // Listen on port for the specified IP address. Use 127.0.0.1 to only | 20 // Listen on port for the specified IP address. Use 127.0.0.1 to only | 
| 21 // accept local connections. | 21 // accept local connections. | 
| 22 static scoped_refptr<TCPListenSocket> CreateAndListen( | 22 static scoped_refptr<TCPListenSocket> CreateAndListen( | 
| 23 const std::string& ip, int port, StreamListenSocket::Delegate* del); | 23 const std::string& ip, int port, StreamListenSocket::Delegate* del); | 
| 24 | 24 | 
| 25 // Get raw TCP socket descriptor bound to ip:port. | 25 // Get raw TCP socket descriptor bound to ip:port. | 
| 26 static SocketDescriptor CreateAndBind(const std::string& ip, int port); | 26 static SocketDescriptor CreateAndBind(const std::string& ip, int port); | 
| 27 | 27 | 
| 28 static int GetBindedPort(SocketDescriptor s); | |
| 
Mark Seaborn
2012/10/23 01:14:50
GetBoundPort()?  This needs a comment to explain t
 
szym
2012/10/23 02:08:48
suggest: GetBoundPort.
I'd generally prefer if al
 
halyavin
2012/10/23 11:59:29
Done.
 | |
| 29 | |
| 28 protected: | 30 protected: | 
| 29 friend class scoped_refptr<TCPListenSocket>; | 31 friend class scoped_refptr<TCPListenSocket>; | 
| 30 | 32 | 
| 31 TCPListenSocket(SocketDescriptor s, StreamListenSocket::Delegate* del); | 33 TCPListenSocket(SocketDescriptor s, StreamListenSocket::Delegate* del); | 
| 32 virtual ~TCPListenSocket(); | 34 virtual ~TCPListenSocket(); | 
| 33 | 35 | 
| 34 // Implements StreamListenSocket::Accept. | 36 // Implements StreamListenSocket::Accept. | 
| 35 virtual void Accept() OVERRIDE; | 37 virtual void Accept() OVERRIDE; | 
| 36 | 38 | 
| 37 private: | 39 private: | 
| (...skipping 13 matching lines...) Expand all Loading... | |
| 51 private: | 53 private: | 
| 52 const std::string ip_; | 54 const std::string ip_; | 
| 53 const int port_; | 55 const int port_; | 
| 54 | 56 | 
| 55 DISALLOW_COPY_AND_ASSIGN(TCPListenSocketFactory); | 57 DISALLOW_COPY_AND_ASSIGN(TCPListenSocketFactory); | 
| 56 }; | 58 }; | 
| 57 | 59 | 
| 58 } // namespace net | 60 } // namespace net | 
| 59 | 61 | 
| 60 #endif // NET_BASE_TCP_LISTEN_SOCKET_H_ | 62 #endif // NET_BASE_TCP_LISTEN_SOCKET_H_ | 
| OLD | NEW |