1 // Copyright 2015 The Chromium Authors 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 NET_BASE_NET_ERROR_DETAILS_H_ 6 #define NET_BASE_NET_ERROR_DETAILS_H_ 7 8 #include "net/base/net_export.h" 9 #include "net/http/http_connection_info.h" 10 #include "net/third_party/quiche/src/quiche/quic/core/quic_error_codes.h" 11 #include "net/third_party/quiche/src/quiche/quic/core/quic_types.h" 12 13 namespace net { 14 15 // A record of net errors with granular error specification generated by 16 // net stack. 17 struct NET_EXPORT NetErrorDetails { NetErrorDetailsNetErrorDetails18 NetErrorDetails() 19 : quic_broken(false), quic_connection_error(quic::QUIC_NO_ERROR) {} 20 NetErrorDetailsNetErrorDetails21 NetErrorDetails(bool quic_broken, quic::QuicErrorCode quic_connection_error) 22 : quic_broken(quic_broken), 23 quic_connection_error(quic_connection_error) {} 24 25 // True if all QUIC alternative services are marked broken for the origin. 26 bool quic_broken; 27 // QUIC granular error info. 28 quic::QuicErrorCode quic_connection_error; 29 // Source of the connection close. 30 quic::ConnectionCloseSource source = quic::ConnectionCloseSource::FROM_SELF; 31 // 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. 34 HttpConnectionInfo connection_info = HttpConnectionInfo::kUNKNOWN; 35 // True if receives a GoAway frame from the server due to connection 36 // migration with port change. 37 bool quic_port_migration_detected = false; 38 bool quic_connection_migration_attempted = false; 39 bool quic_connection_migration_successful = false; 40 }; 41 42 } // namespace net 43 44 #endif // NET_BASE_NET_ERROR_DETAILS_H_ 45