Enable cpplint for webrtc/examples and fix all uncovered cpplint errors.
BUG=webrtc:5273 TESTED=Fixed issues reported by: find webrtc/examples/ -type f -name *.cc -o -name *.h | grep -v objc | xargs cpplint.py followed by 'git cl presubmit'. NOTRY=True Review URL: https://codereview.webrtc.org/1504283004 Cr-Commit-Position: refs/heads/master@{#10960}
This commit is contained in:
@ -8,8 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef TALK_EXAMPLES_PEERCONNECTION_SERVER_DATA_SOCKET_H_
|
||||
#define TALK_EXAMPLES_PEERCONNECTION_SERVER_DATA_SOCKET_H_
|
||||
#ifndef WEBRTC_EXAMPLES_PEERCONNECTION_SERVER_DATA_SOCKET_H_
|
||||
#define WEBRTC_EXAMPLES_PEERCONNECTION_SERVER_DATA_SOCKET_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef WIN32
|
||||
@ -150,4 +150,4 @@ class ListeningSocket : public SocketBase {
|
||||
DataSocket* Accept() const;
|
||||
};
|
||||
|
||||
#endif // TALK_EXAMPLES_PEERCONNECTION_SERVER_DATA_SOCKET_H_
|
||||
#endif // WEBRTC_EXAMPLES_PEERCONNECTION_SERVER_DATA_SOCKET_H_
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
#include "webrtc/examples/peerconnection/server/data_socket.h"
|
||||
#include "webrtc/examples/peerconnection/server/utils.h"
|
||||
#include "webrtc/base/stringutils.h"
|
||||
#include "webrtc/base/urlencode.h"
|
||||
|
||||
using rtc::sprintfn;
|
||||
|
||||
@ -59,7 +60,7 @@ ChannelMember::ChannelMember(DataSocket* socket)
|
||||
assert(socket);
|
||||
assert(socket->method() == DataSocket::GET);
|
||||
assert(socket->PathEquals("/sign_in"));
|
||||
name_ = socket->request_arguments(); // TODO: urldecode
|
||||
name_ = rtc::UrlDecodeString(socket->request_arguments());
|
||||
if (name_.empty())
|
||||
name_ = "peer_" + int2str(id_);
|
||||
else if (name_.length() > kMaxNameLength)
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef TALK_EXAMPLES_PEERCONNECTION_SERVER_PEER_CHANNEL_H_
|
||||
#define TALK_EXAMPLES_PEERCONNECTION_SERVER_PEER_CHANNEL_H_
|
||||
#ifndef WEBRTC_EXAMPLES_PEERCONNECTION_SERVER_PEER_CHANNEL_H_
|
||||
#define WEBRTC_EXAMPLES_PEERCONNECTION_SERVER_PEER_CHANNEL_H_
|
||||
#pragma once
|
||||
|
||||
#include <time.h>
|
||||
@ -117,4 +117,4 @@ class PeerChannel {
|
||||
Members members_;
|
||||
};
|
||||
|
||||
#endif // TALK_EXAMPLES_PEERCONNECTION_SERVER_PEER_CHANNEL_H_
|
||||
#endif // WEBRTC_EXAMPLES_PEERCONNECTION_SERVER_PEER_CHANNEL_H_
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef TALK_EXAMPLES_PEERCONNECTION_SERVER_UTILS_H_
|
||||
#define TALK_EXAMPLES_PEERCONNECTION_SERVER_UTILS_H_
|
||||
#ifndef WEBRTC_EXAMPLES_PEERCONNECTION_SERVER_UTILS_H_
|
||||
#define WEBRTC_EXAMPLES_PEERCONNECTION_SERVER_UTILS_H_
|
||||
#pragma once
|
||||
|
||||
#include <assert.h>
|
||||
@ -22,4 +22,4 @@
|
||||
std::string int2str(int i);
|
||||
std::string size_t2str(size_t i);
|
||||
|
||||
#endif // TALK_EXAMPLES_PEERCONNECTION_SERVER_UTILS_H_
|
||||
#endif // WEBRTC_EXAMPLES_PEERCONNECTION_SERVER_UTILS_H_
|
||||
|
||||
Reference in New Issue
Block a user