net_error_details.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2015 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. #ifndef NET_BASE_NET_ERROR_DETAILS_H_
  5. #define NET_BASE_NET_ERROR_DETAILS_H_
  6. #include "net/base/net_export.h"
  7. #include "net/http/http_response_info.h"
  8. #include "net/third_party/quiche/src/quiche/quic/core/quic_error_codes.h"
  9. namespace net {
  10. // A record of net errors with granular error specification generated by
  11. // net stack.
  12. struct NET_EXPORT NetErrorDetails {
  13. NetErrorDetails()
  14. : quic_broken(false), quic_connection_error(quic::QUIC_NO_ERROR) {}
  15. NetErrorDetails(bool quic_broken, quic::QuicErrorCode quic_connection_error)
  16. : quic_broken(quic_broken),
  17. quic_connection_error(quic_connection_error) {}
  18. // True if all QUIC alternative services are marked broken for the origin.
  19. bool quic_broken;
  20. // QUIC granular error info.
  21. quic::QuicErrorCode quic_connection_error;
  22. // Early prediction of the connection type that this request attempts to use.
  23. // Will be discarded by upper layers if the connection type can be fetched
  24. // from response header from the server.
  25. HttpResponseInfo::ConnectionInfo connection_info =
  26. HttpResponseInfo::CONNECTION_INFO_UNKNOWN;
  27. // True if receives a GoAway frame from the server due to connection
  28. // migration with port change.
  29. bool quic_port_migration_detected = false;
  30. bool quic_connection_migration_attempted = false;
  31. bool quic_connection_migration_successful = false;
  32. };
  33. } // namespace net
  34. #endif // NET_BASE_NET_ERROR_DETAILS_H_