ttuttle | b160737 | 2016-02-09 16:27:16 | [diff] [blame] | 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 | |
| 5 | #ifndef COMPONENTS_DOMAIN_RELIABILITY_QUIC_ERROR_MAPPING_H_ |
| 6 | #define COMPONENTS_DOMAIN_RELIABILITY_QUIC_ERROR_MAPPING_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
vasilvv | 28270e8f | 2016-12-01 21:38:09 | [diff] [blame] | 10 | #include "net/quic/core/quic_packets.h" |
ttuttle | b160737 | 2016-02-09 16:27:16 | [diff] [blame] | 11 | |
| 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 | |
| 15 | namespace 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. |
| 21 | bool 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_ |