quic_error_mapping.h 1.0 KB

1234567891011121314151617181920212223242526
  1. // Copyright 2016 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_DOMAIN_RELIABILITY_QUIC_ERROR_MAPPING_H_
  5. #define COMPONENTS_DOMAIN_RELIABILITY_QUIC_ERROR_MAPPING_H_
  6. #include <string>
  7. #include "net/third_party/quiche/src/quiche/quic/core/quic_packets.h"
  8. // N.B. This file and the .cc are separate from util.h/.cc so that they can be
  9. // independently updated by folks working on QUIC when new errors are added.
  10. namespace domain_reliability {
  11. // Attempts to convert a QUIC error into the quic_error string
  12. // that should be recorded in a beacon. Returns true and parse the QUIC error
  13. // code in |beacon_quic_error_out| if it could.
  14. // Returns false and clear |beacon_quic_error_out| otherwise.
  15. bool GetDomainReliabilityBeaconQuicError(quic::QuicErrorCode quic_error,
  16. std::string* beacon_quic_error_out);
  17. } // namespace domain_reliability
  18. #endif // COMPONENTS_DOMAIN_RELIABILITY_QUIC_ERROR_MAPPING_H_