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

@ -29,16 +29,16 @@ class SocketAddress;
const int HTTP_INVALID_CONNECTION_ID = 0;
struct HttpServerTransaction : public HttpTransaction {
public:
HttpServerTransaction(int id) : connection_id_(id) { }
public:
HttpServerTransaction(int id) : connection_id_(id) {}
int connection_id() const { return connection_id_; }
private:
private:
int connection_id_;
};
class HttpServer {
public:
public:
HttpServer();
virtual ~HttpServer();
@ -54,7 +54,7 @@ public:
// the document can be set to null. Note that the transaction object is still
// owened by the HttpServer at this point.
sigslot::signal3<HttpServer*, HttpServerTransaction*, bool*>
SignalHttpRequestHeader;
SignalHttpRequestHeader;
// An HTTP request has been made, and is available in the transaction object.
// Populate the transaction's response, and then return the object via the
@ -66,7 +66,7 @@ public:
// If you want to know when a request completes, listen to this event.
sigslot::signal3<HttpServer*, HttpServerTransaction*, int>
SignalHttpRequestComplete;
SignalHttpRequestComplete;
// Stop processing the connection indicated by connection_id.
// Unless force is true, the server will complete sending a response that is
@ -78,9 +78,9 @@ public:
// outstanding connections have closed.
sigslot::signal1<HttpServer*> SignalCloseAllComplete;
private:
private:
class Connection : private IHttpNotify {
public:
public:
Connection(int connection_id, HttpServer* server);
~Connection() override;
@ -106,7 +106,7 @@ private:
void Remove(int connection_id);
friend class Connection;
typedef std::map<int,Connection*> ConnectionMap;
typedef std::map<int, Connection*> ConnectionMap;
ConnectionMap connections_;
int next_connection_id_;
@ -116,7 +116,7 @@ private:
//////////////////////////////////////////////////////////////////////
class HttpListenServer : public HttpServer, public sigslot::has_slots<> {
public:
public:
HttpListenServer();
~HttpListenServer() override;
@ -124,9 +124,10 @@ public:
bool GetAddress(SocketAddress* address) const;
void StopListening();
private:
private:
void OnReadEvent(AsyncSocket* socket);
void OnConnectionClosed(HttpServer* server, int connection_id,
void OnConnectionClosed(HttpServer* server,
int connection_id,
StreamInterface* stream);
std::unique_ptr<AsyncSocket> listener_;
@ -136,4 +137,4 @@ private:
} // namespace rtc
#endif // RTC_BASE_HTTPSERVER_H_
#endif // RTC_BASE_HTTPSERVER_H_