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

Unified Diff: net/socket/tcp_listen_socket.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: net/socket/tcp_listen_socket.cc
diff --git a/net/socket/tcp_listen_socket.cc b/net/socket/tcp_listen_socket.cc
index 223abee2cba3be1f47ee1a28bc9e44befcbf6f49..55c74a4b5d5082a02978f64c759bc9876c81e7cc 100644
--- a/net/socket/tcp_listen_socket.cc
+++ b/net/socket/tcp_listen_socket.cc
@@ -31,7 +31,9 @@ namespace net {
// static
scoped_ptr<TCPListenSocket> TCPListenSocket::CreateAndListen(
- const string& ip, int port, StreamListenSocket::Delegate* del) {
+ const string& ip,
+ int port,
+ StreamListenSocket::Delegate* del) {
SocketDescriptor s = CreateAndBind(ip, port);
if (s == kInvalidSocket)
return scoped_ptr<TCPListenSocket>();
@@ -45,7 +47,8 @@ TCPListenSocket::TCPListenSocket(SocketDescriptor s,
: StreamListenSocket(s, del) {
}
-TCPListenSocket::~TCPListenSocket() {}
+TCPListenSocket::~TCPListenSocket() {
+}
SocketDescriptor TCPListenSocket::CreateAndBind(const string& ip, int port) {
SocketDescriptor s = CreatePlatformSocket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
@@ -80,8 +83,9 @@ SocketDescriptor TCPListenSocket::CreateAndBindAnyPort(const string& ip,
return kInvalidSocket;
sockaddr_in addr;
socklen_t addr_size = sizeof(addr);
- bool failed = getsockname(s, reinterpret_cast<struct sockaddr*>(&addr),
- &addr_size) != 0;
+ bool failed =
+ getsockname(s, reinterpret_cast<struct sockaddr*>(&addr), &addr_size) !=
+ 0;
if (addr_size != sizeof(addr))
failed = true;
if (failed) {
@@ -101,9 +105,8 @@ void TCPListenSocket::Accept() {
SocketDescriptor conn = AcceptSocket();
if (conn == kInvalidSocket)
return;
- scoped_ptr<TCPListenSocket> sock(
- new TCPListenSocket(conn, socket_delegate_));
- // It's up to the delegate to AddRef if it wants to keep it around.
+ scoped_ptr<TCPListenSocket> sock(new TCPListenSocket(conn, socket_delegate_));
+// It's up to the delegate to AddRef if it wants to keep it around.
#if defined(OS_POSIX)
sock->WatchSocket(WAITING_READ);
#endif
@@ -111,11 +114,11 @@ void TCPListenSocket::Accept() {
}
TCPListenSocketFactory::TCPListenSocketFactory(const string& ip, int port)
- : ip_(ip),
- port_(port) {
+ : ip_(ip), port_(port) {
}
-TCPListenSocketFactory::~TCPListenSocketFactory() {}
+TCPListenSocketFactory::~TCPListenSocketFactory() {
+}
scoped_ptr<StreamListenSocket> TCPListenSocketFactory::CreateAndListen(
StreamListenSocket::Delegate* delegate) const {

Powered by Google App Engine
This is Rietveld 408576698