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}
diff --git a/examples/peerconnection/server/data_socket.h b/examples/peerconnection/server/data_socket.h
index 6bafa83..4429bc5 100644
--- a/examples/peerconnection/server/data_socket.h
+++ b/examples/peerconnection/server/data_socket.h
@@ -27,7 +27,7 @@
#endif
#ifndef INVALID_SOCKET
-#define INVALID_SOCKET static_cast<NativeSocket>(-1)
+#define INVALID_SOCKET static_cast<NativeSocket>(-1)
#endif
#endif
@@ -35,8 +35,8 @@
class SocketBase {
public:
- SocketBase() : socket_(INVALID_SOCKET) { }
- explicit SocketBase(NativeSocket socket) : socket_(socket) { }
+ SocketBase() : socket_(INVALID_SOCKET) {}
+ explicit SocketBase(NativeSocket socket) : socket_(socket) {}
~SocketBase() { Close(); }
NativeSocket socket() const { return socket_; }
@@ -60,13 +60,9 @@
};
explicit DataSocket(NativeSocket socket)
- : SocketBase(socket),
- method_(INVALID),
- content_length_(0) {
- }
+ : SocketBase(socket), method_(INVALID), content_length_(0) {}
- ~DataSocket() {
- }
+ ~DataSocket() {}
static const char kCrossOriginAllowHeaders[];
@@ -110,9 +106,11 @@
// header terminates with "\r\n".
// |data| is the body of the message. It's length will be specified via
// a "Content-Length" header.
- bool Send(const std::string& status, bool connection_close,
+ bool Send(const std::string& status,
+ bool connection_close,
const std::string& content_type,
- const std::string& extra_headers, const std::string& data) const;
+ const std::string& extra_headers,
+ const std::string& data) const;
// Clears all held state and prepares the socket for receiving a new request.
void Clear();