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 12 namespace net { 13 14 // A record of net errors with granular error specification generated by 15 // net stack. 16 struct NET_EXPORT NetErrorDetails { NetErrorDetailsNetErrorDetails17 NetErrorDetails() 18 : quic_broken(false), quic_connection_error(quic::QUIC_NO_ERROR) {} 19 NetErrorDetailsNetErrorDetails20 NetErrorDetails(bool quic_broken, quic::QuicErrorCode quic_connection_error) 21 : quic_broken(quic_broken), 22 quic_connection_error(quic_connection_error) {} 23 24 // True if all QUIC alternative services are marked broken for the origin. 25 bool quic_broken; 26 // QUIC granular error info. 27 quic::QuicErrorCode quic_connection_error; 28 // Early prediction of the connection type that this request attempts to use. 29 // Will be discarded by upper layers if the connection type can be fetched 30 // from response header from the server. 31 HttpConnectionInfo connection_info = HttpConnectionInfo::kUNKNOWN; 32 // True if receives a GoAway frame from the server due to connection 33 // migration with port change. 34 bool quic_port_migration_detected = false; 35 bool quic_connection_migration_attempted = false; 36 bool quic_connection_migration_successful = false; 37 }; 38 39 } // namespace net 40 41 #endif // NET_BASE_NET_ERROR_DETAILS_H_ 42