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

Unified Diff: runtime/bin/socket_linux.cc

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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
« no previous file with comments | « runtime/bin/socket_fuchsia.cc ('k') | runtime/bin/socket_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_linux.cc
diff --git a/runtime/bin/socket_linux.cc b/runtime/bin/socket_linux.cc
index 52221d5c996254809c0ea756961ee158001dbd3a..c3bfe9b1da126c0d68a6770c7ea9090030d8e326 100644
--- a/runtime/bin/socket_linux.cc
+++ b/runtime/bin/socket_linux.cc
@@ -9,7 +9,7 @@
#include "bin/socket.h"
-#include <errno.h> // NOLINT
+#include <errno.h> // NOLINT
#include "bin/fdutils.h"
#include "platform/signal_blocker.h"
@@ -20,12 +20,10 @@ namespace bin {
Socket::Socket(intptr_t fd)
: ReferenceCounted(), fd_(fd), port_(ILLEGAL_PORT) {}
-
void Socket::SetClosedFd() {
fd_ = kClosedFd;
}
-
static intptr_t Create(const RawAddr& addr) {
intptr_t fd;
intptr_t type = SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC;
@@ -36,7 +34,6 @@ static intptr_t Create(const RawAddr& addr) {
return fd;
}
-
static intptr_t Connect(intptr_t fd, const RawAddr& addr) {
intptr_t result = TEMP_FAILURE_RETRY(
connect(fd, &addr.addr, SocketAddress::GetAddrLength(addr)));
@@ -47,7 +44,6 @@ static intptr_t Connect(intptr_t fd, const RawAddr& addr) {
return -1;
}
-
intptr_t Socket::CreateConnect(const RawAddr& addr) {
intptr_t fd = Create(addr);
if (fd < 0) {
@@ -56,7 +52,6 @@ intptr_t Socket::CreateConnect(const RawAddr& addr) {
return Connect(fd, addr);
}
-
intptr_t Socket::CreateBindConnect(const RawAddr& addr,
const RawAddr& source_addr) {
intptr_t fd = Create(addr);
@@ -74,7 +69,6 @@ intptr_t Socket::CreateBindConnect(const RawAddr& addr,
return Connect(fd, addr);
}
-
intptr_t Socket::CreateBindDatagram(const RawAddr& addr, bool reuseAddress) {
intptr_t fd;
@@ -99,7 +93,6 @@ intptr_t Socket::CreateBindDatagram(const RawAddr& addr, bool reuseAddress) {
return fd;
}
-
intptr_t ServerSocket::CreateBindListen(const RawAddr& addr,
intptr_t backlog,
bool v6_only) {
@@ -145,13 +138,11 @@ intptr_t ServerSocket::CreateBindListen(const RawAddr& addr,
return fd;
}
-
bool ServerSocket::StartAccept(intptr_t fd) {
USE(fd);
return true;
}
-
static bool IsTemporaryAcceptError(int error) {
// On Linux a number of protocol errors should be treated as EAGAIN.
// These are the ones for TCP/IP.
@@ -161,7 +152,6 @@ static bool IsTemporaryAcceptError(int error) {
(error == ENETUNREACH);
}
-
intptr_t ServerSocket::Accept(intptr_t fd) {
intptr_t socket;
struct sockaddr clientaddr;
« no previous file with comments | « runtime/bin/socket_fuchsia.cc ('k') | runtime/bin/socket_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698