Fix cpplint errors in pseudotcp/test
Bug: webrtc:5273
Change-Id: I09181651c35087b6403c04b6fe542b3e80b13fab
Reviewed-on: https://webrtc-review.googlesource.com/26443
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21129}diff --git a/p2p/base/pseudotcp.cc b/p2p/base/pseudotcp.cc
index d4941c9..e15ec40 100644
--- a/p2p/base/pseudotcp.cc
+++ b/p2p/base/pseudotcp.cc
@@ -69,7 +69,7 @@
const uint32_t IP_HEADER_SIZE = 20; // (+ up to 40 bytes of options?)
const uint32_t UDP_HEADER_SIZE = 8;
-// TODO: Make JINGLE_HEADER_SIZE transparent to this code?
+// TODO(?): Make JINGLE_HEADER_SIZE transparent to this code?
const uint32_t JINGLE_HEADER_SIZE = 64; // when relay framing is in use
// Default size for receive and send buffer.
@@ -165,11 +165,11 @@
#if 0 // Not used yet
enum Stat {
- S_SENT_PACKET, // All packet sends
- S_RESENT_PACKET, // All packet sends that are retransmits
- S_RECV_PACKET, // All packet receives
- S_RECV_NEW, // All packet receives that are too new
- S_RECV_OLD, // All packet receives that are too old
+ S_SENT_PACKET, // All packet sends
+ S_RESENT_PACKET, // All packet sends that are retransmits
+ S_RECV_PACKET, // All packet receives
+ S_RECV_NEW, // All packet receives that are too new
+ S_RECV_OLD, // All packet receives that are too old
S_NUM_STATS
};
@@ -1124,7 +1124,7 @@
if (!transmit(seg, now)) {
RTC_LOG_F(LS_VERBOSE) << "transmit failed";
- // TODO: consider closing socket
+ // TODO(?): consider closing socket
return;
}
@@ -1230,7 +1230,7 @@
void PseudoTcp::applyOption(char kind, const char* data, uint32_t len) {
if (kind == TCP_OPT_MSS) {
RTC_LOG(LS_WARNING) << "Peer specified MSS option which is not supported.";
- // TODO: Implement.
+ // TODO(?): Implement.
} else if (kind == TCP_OPT_WND_SCALE) {
// Window scale factor.
// http://www.ietf.org/rfc/rfc1323.txt
diff --git a/p2p/base/pseudotcp_unittest.cc b/p2p/base/pseudotcp_unittest.cc
index 4dd4cd8..fb9a503 100644
--- a/p2p/base/pseudotcp_unittest.cc
+++ b/p2p/base/pseudotcp_unittest.cc
@@ -9,6 +9,7 @@
*/
#include <algorithm>
+#include <string>
#include <vector>
#include "p2p/base/pseudotcp.h"
@@ -122,7 +123,7 @@
// virtual void OnTcpWritable(PseudoTcp* tcp)
virtual void OnTcpClosed(PseudoTcp* tcp, uint32_t error) {
// Consider ourselves closed when the remote side gets OnTcpClosed.
- // TODO: OnTcpClosed is only ever notified in case of error in
+ // TODO(?): OnTcpClosed is only ever notified in case of error in
// the current implementation. Solicited close is not (yet) supported.
RTC_LOG(LS_VERBOSE) << "Closed";
EXPECT_EQ(0U, error);
@@ -224,7 +225,7 @@
elapsed = rtc::Time32() - start;
recv_stream_.GetSize(&received);
// Ensure we closed down OK and we got the right data.
- // TODO: Ensure the errors are cleared properly.
+ // TODO(?): Ensure the errors are cleared properly.
// EXPECT_EQ(0, local_.GetError());
// EXPECT_EQ(0, remote_.GetError());
EXPECT_EQ(static_cast<size_t>(size), received);
@@ -242,7 +243,7 @@
if (tcp == &remote_) {
ReadData();
- // TODO: OnTcpClosed() is currently only notified on error -
+ // TODO(?): OnTcpClosed() is currently only notified on error -
// there is no on-the-wire equivalent of TCP FIN.
// So we fake the notification when all the data has been read.
size_t received, required;
@@ -359,7 +360,7 @@
if (position == desired) {
if (receiver_ == &local_ && --iterations_remaining_ == 0) {
Close();
- // TODO: Fake OnTcpClosed() on the receiver for now.
+ // TODO(?): Fake OnTcpClosed() on the receiver for now.
OnTcpClosed(&remote_, 0);
return;
}
@@ -817,7 +818,7 @@
/* Test sending data with mismatched MTUs. We should detect this and reduce
// our packet size accordingly.
-// TODO: This doesn't actually work right now. The current code
+// TODO(?): This doesn't actually work right now. The current code
// doesn't detect if the MTU is set too high on either side.
TEST_F(PseudoTcpTest, TestSendWithMismatchedMtus) {
SetLocalMtu(1500);