Migration from GFE_BUG_V2 (and friends) to GFE_BUG

Per go/gfe-bug-improvements GFE_BUGs are getting stable IDs to allow for monitoring and alerting. To achieve that, a temporary set of V2 macros was added and the codebase was migrated to using the V2 macros. Now that migration is complete, the old-style (sans _V2) macros were changed to also take bug_id parameter, which makes the V2 set obsolete. To complete the transition, the codebase is being migrated back to GFE_BUG macros. Once done, V2 macros will be removed.

PiperOrigin-RevId: 363274549
Change-Id: I8cdaaff07899a0462d2d6b3f8d9b9248424a6ce2
diff --git a/quic/qbone/qbone_client_session.cc b/quic/qbone/qbone_client_session.cc
index 72d849b..1f8ca0a 100644
--- a/quic/qbone/qbone_client_session.cc
+++ b/quic/qbone/qbone_client_session.cc
@@ -72,7 +72,7 @@
 
 bool QboneClientSession::SendServerRequest(const QboneServerRequest& request) {
   if (!control_stream_) {
-    QUIC_BUG_V2(quic_bug_11056_1)
+    QUIC_BUG(quic_bug_11056_1)
         << "Cannot send server request before control stream is created.";
     return false;
   }
diff --git a/quic/qbone/qbone_control_stream.cc b/quic/qbone/qbone_control_stream.cc
index e0d98ff..944257f 100644
--- a/quic/qbone/qbone_control_stream.cc
+++ b/quic/qbone/qbone_control_stream.cc
@@ -48,11 +48,11 @@
 bool QboneControlStreamBase::SendMessage(const proto2::Message& proto) {
   std::string tmp;
   if (!proto.SerializeToString(&tmp)) {
-    QUIC_BUG_V2(quic_bug_11023_1) << "Failed to serialize QboneControlRequest";
+    QUIC_BUG(quic_bug_11023_1) << "Failed to serialize QboneControlRequest";
     return false;
   }
   if (tmp.size() > kuint16max) {
-    QUIC_BUG_V2(quic_bug_11023_2)
+    QUIC_BUG(quic_bug_11023_2)
         << "QboneControlRequest too large: " << tmp.size() << " > "
         << kuint16max;
     return false;
diff --git a/quic/qbone/qbone_packet_processor.cc b/quic/qbone/qbone_packet_processor.cc
index a24ae5f..7b45ed1 100644
--- a/quic/qbone/qbone_packet_processor.cc
+++ b/quic/qbone/qbone_packet_processor.cc
@@ -62,7 +62,7 @@
 void QbonePacketProcessor::ProcessPacket(std::string* packet,
                                          Direction direction) {
   if (QUIC_PREDICT_FALSE(!IsValid())) {
-    QUIC_BUG_V2(quic_bug_11024_1)
+    QUIC_BUG(quic_bug_11024_1)
         << "QuicPacketProcessor is invoked in an invalid state.";
     stats_->OnPacketDroppedSilently(direction);
     return;
@@ -121,7 +121,7 @@
     // Sanity-check the bounds.
     if (packet_data >= *transport_data || header_size > packet->size() ||
         header_size < kIPv6HeaderSize) {
-      QUIC_BUG_V2(quic_bug_11024_2)
+      QUIC_BUG(quic_bug_11024_2)
           << "Invalid pointers encountered in "
              "QbonePacketProcessor::ProcessPacket.  Dropping the packet";
       return ProcessingResult::SILENT_DROP;
diff --git a/quic/qbone/qbone_server_session.cc b/quic/qbone/qbone_server_session.cc
index 64773f4..3b80dab 100644
--- a/quic/qbone/qbone_server_session.cc
+++ b/quic/qbone/qbone_server_session.cc
@@ -66,7 +66,7 @@
 
 bool QboneServerSession::SendClientRequest(const QboneClientRequest& request) {
   if (!control_stream_) {
-    QUIC_BUG_V2(quic_bug_11026_1)
+    QUIC_BUG(quic_bug_11026_1)
         << "Cannot send client request before control stream is created.";
     return false;
   }
diff --git a/quic/qbone/qbone_session_base.cc b/quic/qbone/qbone_session_base.cc
index 968a51a..0badb91 100644
--- a/quic/qbone/qbone_session_base.cc
+++ b/quic/qbone/qbone_session_base.cc
@@ -133,7 +133,7 @@
 
 void QboneSessionBase::SendPacketToPeer(absl::string_view packet) {
   if (crypto_stream_ == nullptr) {
-    QUIC_BUG_V2(quic_bug_10987_1)
+    QUIC_BUG(quic_bug_10987_1)
         << "Attempting to send packet before encryption established";
     return;
   }
@@ -148,7 +148,7 @@
         break;
       case MESSAGE_STATUS_TOO_LARGE: {
         if (packet.size() < sizeof(ip6_hdr)) {
-          QUIC_BUG_V2(quic_bug_10987_2)
+          QUIC_BUG(quic_bug_10987_2)
               << "Dropped malformed packet: IPv6 header too short";
           break;
         }
@@ -166,17 +166,17 @@
         break;
       }
       case MESSAGE_STATUS_ENCRYPTION_NOT_ESTABLISHED:
-        QUIC_BUG_V2(quic_bug_10987_3)
+        QUIC_BUG(quic_bug_10987_3)
             << "MESSAGE_STATUS_ENCRYPTION_NOT_ESTABLISHED";
         break;
       case MESSAGE_STATUS_UNSUPPORTED:
-        QUIC_BUG_V2(quic_bug_10987_4) << "MESSAGE_STATUS_UNSUPPORTED";
+        QUIC_BUG(quic_bug_10987_4) << "MESSAGE_STATUS_UNSUPPORTED";
         break;
       case MESSAGE_STATUS_BLOCKED:
-        QUIC_BUG_V2(quic_bug_10987_5) << "MESSAGE_STATUS_BLOCKED";
+        QUIC_BUG(quic_bug_10987_5) << "MESSAGE_STATUS_BLOCKED";
         break;
       case MESSAGE_STATUS_INTERNAL_ERROR:
-        QUIC_BUG_V2(quic_bug_10987_6) << "MESSAGE_STATUS_INTERNAL_ERROR";
+        QUIC_BUG(quic_bug_10987_6) << "MESSAGE_STATUS_INTERNAL_ERROR";
         break;
     }
     return;
@@ -185,8 +185,7 @@
   // QBONE streams are ephemeral.
   QuicStream* stream = CreateOutgoingStream();
   if (!stream) {
-    QUIC_BUG_V2(quic_bug_10987_7)
-        << "Failed to create an outgoing QBONE stream.";
+    QUIC_BUG(quic_bug_10987_7) << "Failed to create an outgoing QBONE stream.";
     return;
   }