0
Files
src/components/cronet/android/url_request_close_source.h
Mohannad Farrag 043089d588 Add ConnectionCloseSource to QuicException
Added a unit-test which exercises a server-close through QUIC, this is
built upon QuicTestServer, I believe that there is a lot of potential
for testing using QuicTestServer. However, it lives in google3 and
makes the iteration speed slow but suffice for this case.

Bug: 336506790
Change-Id: Iea8919f9c45ab4812b6478d156d77a573efe277c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5659918
Auto-Submit: Mohannad Farrag <aymanm@google.com>
Commit-Queue: Stefano Duo <stefanoduo@google.com>
Commit-Queue: Mohannad Farrag <aymanm@google.com>
Reviewed-by: Stefano Duo <stefanoduo@google.com>
Cr-Commit-Position: refs/heads/main@{#1323719}
2024-07-05 15:28:00 +00:00

26 lines
864 B
C++

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_CRONET_ANDROID_URL_REQUEST_CLOSE_SOURCE_H_
#define COMPONENTS_CRONET_ANDROID_URL_REQUEST_CLOSE_SOURCE_H_
#include "net/third_party/quiche/src/quiche/quic/core/quic_types.h"
namespace cronet {
// Do not reorder, this is bundled in both Cronet Impl and API which
// means that the versions might mismatch, Only add new entries.
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net
enum class ConnectionCloseSource {
UNKNOWN = 0,
PEER = 1,
SELF = 2,
};
// Converts net error initiator source to counterparts accessible in Java.
ConnectionCloseSource NetSourceToJavaSource(quic::ConnectionCloseSource source);
} // namespace cronet
#endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_CLOSE_SOURCE_H_