Add logging and edit the field trial name for piggyback ICE check
acknowledgement.

Bug: None
Change-Id: I46fd46c70f7652424a454d62ec63a86af9f085db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143000
Reviewed-by: Honghai Zhang <honghaiz@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28326}
diff --git a/p2p/base/connection.cc b/p2p/base/connection.cc
index 2b04aa5..6d4c3de 100644
--- a/p2p/base/connection.cc
+++ b/p2p/base/connection.cc
@@ -170,7 +170,8 @@
   request->AddAttribute(absl::make_unique<StunUInt32Attribute>(
       STUN_ATTR_NETWORK_INFO, network_info));
 
-  if (webrtc::field_trial::IsEnabled("WebRTC-PiggybackCheckAcknowledgement") &&
+  if (webrtc::field_trial::IsEnabled(
+          "WebRTC-PiggybackIceCheckAcknowledgement") &&
       connection_->last_ping_id_received()) {
     request->AddAttribute(absl::make_unique<StunByteStringAttribute>(
         STUN_ATTR_LAST_ICE_CHECK_RECEIVED,
@@ -561,7 +562,8 @@
     }
   }
 
-  if (webrtc::field_trial::IsEnabled("WebRTC-PiggybackCheckAcknowledgement")) {
+  if (webrtc::field_trial::IsEnabled(
+          "WebRTC-PiggybackIceCheckAcknowledgement")) {
     HandlePiggybackCheckAcknowledgementIfAny(msg);
   }
 }
@@ -708,6 +710,10 @@
         pings_since_last_response_,
         [&request_id](const SentPing& ping) { return ping.id == request_id; });
     if (iter != pings_since_last_response_.end()) {
+      rtc::LoggingSeverity sev = !writable() ? rtc::LS_INFO : rtc::LS_VERBOSE;
+      RTC_LOG_V(sev) << ToString()
+                     << ": Received piggyback STUN ping response, id="
+                     << rtc::hex_encode(request_id);
       const int64_t rtt = rtc::TimeMillis() - iter->sent_time;
       ReceivedPingResponse(rtt, request_id, iter->nomination);
     }
diff --git a/p2p/base/p2p_transport_channel_unittest.cc b/p2p/base/p2p_transport_channel_unittest.cc
index b97e66b..8558efc 100644
--- a/p2p/base/p2p_transport_channel_unittest.cc
+++ b/p2p/base/p2p_transport_channel_unittest.cc
@@ -2261,7 +2261,7 @@
 TEST_F(P2PTransportChannelTest,
        CanConnectWithPiggybackCheckAcknowledgementWhenCheckResponseBlocked) {
   webrtc::test::ScopedFieldTrials field_trials(
-      "WebRTC-PiggybackCheckAcknowledgement/Enabled/");
+      "WebRTC-PiggybackIceCheckAcknowledgement/Enabled/");
   rtc::ScopedFakeClock clock;
   ConfigureEndpoints(OPEN, OPEN, kOnlyLocalPorts, kOnlyLocalPorts);
   IceConfig ep1_config;