gfe-relnote: rename OnConnectivityProbeReceived to OnPacketReceived.
Not flag protected, this is a refactor and has no behavior change.
Currently OnConnectivityProbeReceived is called in two cases:
1. notify the server that a "connectivity probe packet" is received
2. notify the client that a "general packet" is received.
The name of the function is not correct in seconds case. This change
renames the method to OnPacketReceived with an additional parameter
passed to indicate whether the packet is a connectivity probe.
PiperOrigin-RevId: 264168409
Change-Id: I49cd3bc173e1ede3a3b72dc106380769ad50721b
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc
index 836f09f..0bd2c57 100644
--- a/quic/core/quic_connection_test.cc
+++ b/quic/core/quic_connection_test.cc
@@ -1013,7 +1013,7 @@
EXPECT_CALL(visitor_, ShouldKeepConnectionAlive())
.WillRepeatedly(Return(false));
EXPECT_CALL(visitor_, OnCongestionWindowChange(_)).Times(AnyNumber());
- EXPECT_CALL(visitor_, OnConnectivityProbeReceived(_, _)).Times(AnyNumber());
+ EXPECT_CALL(visitor_, OnPacketReceived(_, _, _)).Times(AnyNumber());
EXPECT_CALL(visitor_, OnForwardProgressConfirmed()).Times(AnyNumber());
EXPECT_CALL(*loss_algorithm_, GetLossTimeout())
@@ -1956,7 +1956,7 @@
EXPECT_EQ(kPeerAddress, connection_.effective_peer_address());
EXPECT_CALL(visitor_, OnConnectionMigration(PORT_CHANGE)).Times(0);
- EXPECT_CALL(visitor_, OnConnectivityProbeReceived(_, _)).Times(0);
+ EXPECT_CALL(visitor_, OnPacketReceived(_, _, false)).Times(0);
// Process a padded PING or PATH CHALLENGE packet with no peer address change
// on server side will be ignored.
@@ -2076,7 +2076,7 @@
EXPECT_EQ(kPeerAddress, connection_.effective_peer_address());
EXPECT_CALL(visitor_, OnConnectionMigration(PORT_CHANGE)).Times(0);
- EXPECT_CALL(visitor_, OnConnectivityProbeReceived(_, _)).Times(1);
+ EXPECT_CALL(visitor_, OnPacketReceived(_, _, true)).Times(1);
// Process a padded PING packet from a new peer address on server side
// is effectively receiving a connectivity probing.
@@ -2139,7 +2139,7 @@
QuicPacketCreatorPeer::SetPacketNumber(&peer_creator_, 4);
EXPECT_CALL(visitor_, OnConnectionMigration(PORT_CHANGE)).Times(0);
- EXPECT_CALL(visitor_, OnConnectivityProbeReceived(_, _)).Times(1);
+ EXPECT_CALL(visitor_, OnPacketReceived(_, _, true)).Times(1);
// Process a padded PING packet from a new peer address on server side
// is effectively receiving a connectivity probing, even if a newer packet has
@@ -2192,7 +2192,7 @@
EXPECT_EQ(kPeerAddress, connection_.effective_peer_address());
EXPECT_CALL(visitor_, OnConnectionMigration(PORT_CHANGE)).Times(0);
- EXPECT_CALL(visitor_, OnConnectivityProbeReceived(_, _)).Times(1);
+ EXPECT_CALL(visitor_, OnPacketReceived(_, _, true)).Times(1);
// Process a padded PING packet from a new peer address on server side
// is effectively receiving a connectivity probing.
@@ -2247,7 +2247,7 @@
// Client takes all padded PING packet as speculative connectivity
// probing packet, and reports to visitor.
EXPECT_CALL(visitor_, OnConnectionMigration(PORT_CHANGE)).Times(0);
- EXPECT_CALL(visitor_, OnConnectivityProbeReceived(_, _)).Times(1);
+ EXPECT_CALL(visitor_, OnPacketReceived(_, _, false)).Times(1);
OwningSerializedPacketPointer probing_packet = ConstructProbingPacket();
std::unique_ptr<QuicReceivedPacket> received(ConstructReceivedPacket(
@@ -2294,7 +2294,7 @@
// Process a padded PING packet with a different self address on client side
// is effectively receiving a connectivity probing.
EXPECT_CALL(visitor_, OnConnectionMigration(PORT_CHANGE)).Times(0);
- EXPECT_CALL(visitor_, OnConnectivityProbeReceived(_, _)).Times(1);
+ EXPECT_CALL(visitor_, OnPacketReceived(_, _, true)).Times(1);
const QuicSocketAddress kNewSelfAddress =
QuicSocketAddress(QuicIpAddress::Loopback6(), /*port=*/23456);