blob: 295f1def19000a827ace91d90fe6e0aad44fbf7f [file] [log] [blame]
Avi Drissman64595482022-09-14 20:52:291// Copyright 2015 The Chromium Authors
zhongyi48704c182015-12-07 07:52:022// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef NET_BASE_NET_ERROR_DETAILS_H_
6#define NET_BASE_NET_ERROR_DETAILS_H_
7
bnc81c46c1f2016-10-04 16:25:598#include "net/base/net_export.h"
Tsuyoshi Horo3023b5d2023-11-28 21:40:319#include "net/http/http_connection_info.h"
Ryan Hamiltonea4fa192022-04-12 18:30:4910#include "net/third_party/quiche/src/quiche/quic/core/quic_error_codes.h"
Mohannad Farragbc22ca52024-07-02 00:17:5511#include "net/third_party/quiche/src/quiche/quic/core/quic_types.h"
zhongyi48704c182015-12-07 07:52:0212
13namespace net {
14
15// A record of net errors with granular error specification generated by
16// net stack.
17struct NET_EXPORT NetErrorDetails {
zhongyica364fbb2015-12-12 03:39:1218 NetErrorDetails()
Tsuyoshi Horo432981d52022-06-09 09:50:1319 : quic_broken(false), quic_connection_error(quic::QUIC_NO_ERROR) {}
zhongyi48704c182015-12-07 07:52:0220
Ryan Hamilton8d9ee76e2018-05-29 23:52:5221 NetErrorDetails(bool quic_broken, quic::QuicErrorCode quic_connection_error)
zhongyica364fbb2015-12-12 03:39:1222 : quic_broken(quic_broken),
Tsuyoshi Horo432981d52022-06-09 09:50:1323 quic_connection_error(quic_connection_error) {}
zhongyi48704c182015-12-07 07:52:0224
25 // True if all QUIC alternative services are marked broken for the origin.
26 bool quic_broken;
zhongyica364fbb2015-12-12 03:39:1227 // QUIC granular error info.
Ryan Hamilton8d9ee76e2018-05-29 23:52:5228 quic::QuicErrorCode quic_connection_error;
Mohannad Farragbc22ca52024-07-02 00:17:5529 // Source of the connection close.
30 quic::ConnectionCloseSource source = quic::ConnectionCloseSource::FROM_SELF;
zhongyi2ed4a6a2016-02-26 19:45:4231 // Early prediction of the connection type that this request attempts to use.
32 // Will be discarded by upper layers if the connection type can be fetched
33 // from response header from the server.
Tsuyoshi Horo3023b5d2023-11-28 21:40:3134 HttpConnectionInfo connection_info = HttpConnectionInfo::kUNKNOWN;
zhongyi6b5a3892016-03-12 04:46:2035 // True if receives a GoAway frame from the server due to connection
36 // migration with port change.
Tsuyoshi Horo432981d52022-06-09 09:50:1337 bool quic_port_migration_detected = false;
Stefano Duo69dc6a32022-07-13 12:08:3038 bool quic_connection_migration_attempted = false;
39 bool quic_connection_migration_successful = false;
zhongyi48704c182015-12-07 07:52:0240};
41
42} // namespace net
43
bnc3698b0a02016-12-09 23:36:5044#endif // NET_BASE_NET_ERROR_DETAILS_H_