blob: f9d373b27d6fe42e9085b6197416cf8851f14b21 [file] [log] [blame]
ttuttleb1607372016-02-09 16:27:161// 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
5#ifndef COMPONENTS_DOMAIN_RELIABILITY_QUIC_ERROR_MAPPING_H_
6#define COMPONENTS_DOMAIN_RELIABILITY_QUIC_ERROR_MAPPING_H_
7
8#include <string>
9
vasilvv28270e8f2016-12-01 21:38:0910#include "net/quic/core/quic_packets.h"
ttuttleb1607372016-02-09 16:27:1611
12// N.B. This file and the .cc are separate from util.h/.cc so that they can be
13// independently updated by folks working on QUIC when new errors are added.
14
15namespace domain_reliability {
16
17// Attempts to convert a QUIC error into the quic_error string
18// that should be recorded in a beacon. Returns true and parse the QUIC error
19// code in |beacon_quic_error_out| if it could.
20// Returns false and clear |beacon_quic_error_out| otherwise.
21bool GetDomainReliabilityBeaconQuicError(net::QuicErrorCode quic_error,
22 std::string* beacon_quic_error_out);
23
24} // namespace domain_reliability
25
26#endif // COMPONENTS_DOMAIN_RELIABILITY_QUIC_ERROR_MAPPING_H_