Reformat the WebRTC code base

Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
Yves Gerey
2018-06-19 15:03:05 +02:00
parent b602123a5a
commit 665174fdbb
1569 changed files with 30495 additions and 30309 deletions

View File

@ -14,10 +14,10 @@
#include <errno.h>
#if defined(WEBRTC_POSIX)
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#define SOCKET_EACCES EACCES
#endif
@ -183,8 +183,8 @@ class Socket {
virtual int Bind(const SocketAddress& addr) = 0;
virtual int Connect(const SocketAddress& addr) = 0;
virtual int Send(const void *pv, size_t cb) = 0;
virtual int SendTo(const void *pv, size_t cb, const SocketAddress& addr) = 0;
virtual int Send(const void* pv, size_t cb) = 0;
virtual int SendTo(const void* pv, size_t cb, const SocketAddress& addr) = 0;
// |timestamp| is in units of microseconds.
virtual int Recv(void* pv, size_t cb, int64_t* timestamp) = 0;
virtual int RecvFrom(void* pv,
@ -192,26 +192,22 @@ class Socket {
SocketAddress* paddr,
int64_t* timestamp) = 0;
virtual int Listen(int backlog) = 0;
virtual Socket *Accept(SocketAddress *paddr) = 0;
virtual Socket* Accept(SocketAddress* paddr) = 0;
virtual int Close() = 0;
virtual int GetError() const = 0;
virtual void SetError(int error) = 0;
inline bool IsBlocking() const { return IsBlockingError(GetError()); }
enum ConnState {
CS_CLOSED,
CS_CONNECTING,
CS_CONNECTED
};
enum ConnState { CS_CLOSED, CS_CONNECTING, CS_CONNECTED };
virtual ConnState GetState() const = 0;
enum Option {
OPT_DONTFRAGMENT,
OPT_RCVBUF, // receive buffer size
OPT_SNDBUF, // send buffer size
OPT_NODELAY, // whether Nagle algorithm is enabled
OPT_IPV6_V6ONLY, // Whether the socket is IPv6 only.
OPT_DSCP, // DSCP code
OPT_RCVBUF, // receive buffer size
OPT_SNDBUF, // send buffer size
OPT_NODELAY, // whether Nagle algorithm is enabled
OPT_IPV6_V6ONLY, // Whether the socket is IPv6 only.
OPT_DSCP, // DSCP code
OPT_RTP_SENDTIME_EXTN_ID, // This is a non-traditional socket option param.
// This is specific to libjingle and will be used
// if SendTime option is needed at socket level.