gfe-relnote: n/a (Refactor) Move the only method in ConnectionCloseDelegateInterface into QuicPacketCreator::Delegate and delete ConnectionCloseDelegateInterface.  No functional change, not flag protected.

PiperOrigin-RevId: 246876407
Change-Id: I59bcedfc20ec1b169f9f1113b4d18f5ecdf2bba0
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h
index c563b39..b28ece5 100644
--- a/quic/core/quic_connection.h
+++ b/quic/core/quic_connection.h
@@ -517,11 +517,6 @@
   void OnAuthenticatedIetfStatelessResetPacket(
       const QuicIetfStatelessResetPacket& packet) override;
 
-  // QuicConnectionCloseDelegateInterface
-  void OnUnrecoverableError(QuicErrorCode error,
-                            const std::string& error_details,
-                            ConnectionCloseSource source) override;
-
   // QuicPacketGenerator::DelegateInterface
   bool ShouldGeneratePacket(HasRetransmittableData retransmittable,
                             IsHandshake handshake) override;
@@ -532,6 +527,9 @@
   // QuicPacketCreator::DelegateInterface
   char* GetPacketBuffer() override;
   void OnSerializedPacket(SerializedPacket* packet) override;
+  void OnUnrecoverableError(QuicErrorCode error,
+                            const std::string& error_details,
+                            ConnectionCloseSource source) override;
 
   // QuicSentPacketManager::NetworkChangeVisitor
   void OnCongestionChange() override;
diff --git a/quic/core/quic_connection_close_delegate_interface.h b/quic/core/quic_connection_close_delegate_interface.h
deleted file mode 100644
index b245f4c..0000000
--- a/quic/core/quic_connection_close_delegate_interface.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef QUICHE_QUIC_CORE_QUIC_CONNECTION_CLOSE_DELEGATE_INTERFACE_H_
-#define QUICHE_QUIC_CORE_QUIC_CONNECTION_CLOSE_DELEGATE_INTERFACE_H_
-
-#include <string>
-
-#include "net/third_party/quiche/src/quic/core/quic_error_codes.h"
-#include "net/third_party/quiche/src/quic/core/quic_types.h"
-#include "net/third_party/quiche/src/quic/platform/api/quic_export.h"
-
-namespace quic {
-
-// Pure virtual class to close connection on unrecoverable errors.
-class QUIC_EXPORT_PRIVATE QuicConnectionCloseDelegateInterface {
- public:
-  virtual ~QuicConnectionCloseDelegateInterface() {}
-
-  // Called when an unrecoverable error is encountered.
-  virtual void OnUnrecoverableError(QuicErrorCode error,
-                                    const std::string& error_details,
-                                    ConnectionCloseSource source) = 0;
-};
-
-}  // namespace quic
-
-#endif  // QUICHE_QUIC_CORE_QUIC_CONNECTION_CLOSE_DELEGATE_INTERFACE_H_
diff --git a/quic/core/quic_packet_creator.h b/quic/core/quic_packet_creator.h
index f420d9e..99e8cc3 100644
--- a/quic/core/quic_packet_creator.h
+++ b/quic/core/quic_packet_creator.h
@@ -13,7 +13,6 @@
 #include <utility>
 #include <vector>
 
-#include "net/third_party/quiche/src/quic/core/quic_connection_close_delegate_interface.h"
 #include "net/third_party/quiche/src/quic/core/quic_framer.h"
 #include "net/third_party/quiche/src/quic/core/quic_packets.h"
 #include "net/third_party/quiche/src/quic/core/quic_pending_retransmission.h"
@@ -28,10 +27,9 @@
 class QUIC_EXPORT_PRIVATE QuicPacketCreator {
  public:
   // A delegate interface for further processing serialized packet.
-  class QUIC_EXPORT_PRIVATE DelegateInterface
-      : public QuicConnectionCloseDelegateInterface {
+  class QUIC_EXPORT_PRIVATE DelegateInterface {
    public:
-    ~DelegateInterface() override {}
+    virtual ~DelegateInterface() {}
     // Get a buffer of kMaxOutgoingPacketSize bytes to serialize the next
     // packet. If return nullptr, QuicPacketCreator will serialize on a stack
     // buffer.
@@ -40,6 +38,11 @@
     // of |serialized_packet|, but takes ownership of any frames it removes
     // from |packet.retransmittable_frames|.
     virtual void OnSerializedPacket(SerializedPacket* serialized_packet) = 0;
+
+    // Called when an unrecoverable error is encountered.
+    virtual void OnUnrecoverableError(QuicErrorCode error,
+                                      const std::string& error_details,
+                                      ConnectionCloseSource source) = 0;
   };
 
   // Interface which gets callbacks from the QuicPacketCreator at interesting