#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "services/network/public/mojom/devtools_observer.mojom-blink.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "services/network/public/mojom/devtools_observer.mojom-params-data.h"
#include "services/network/public/mojom/devtools_observer.mojom-shared-message-ids.h"
#include "services/network/public/mojom/devtools_observer.mojom-blink-import-headers.h"
#include "services/network/public/mojom/devtools_observer.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
namespace network::mojom::blink {
URLRequestDevToolsInfo::URLRequestDevToolsInfo()
: … { … }
URLRequestDevToolsInfo::URLRequestDevToolsInfo(
const WTF::String& method_in,
const ::blink::KURL& url_in,
::net::RequestPriority priority_in,
::net::ReferrerPolicy referrer_policy_in,
::network::mojom::blink::TrustTokenParamsPtr trust_token_params_in,
bool has_user_gesture_in,
uint32_t resource_type_in)
: … { … }
URLRequestDevToolsInfo::~URLRequestDevToolsInfo() = default;
void URLRequestDevToolsInfo::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool URLRequestDevToolsInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
URLResponseHeadDevToolsInfo::URLResponseHeadDevToolsInfo()
: … { … }
URLResponseHeadDevToolsInfo::URLResponseHeadDevToolsInfo(
::base::Time response_time_in,
::network::mojom::blink::HttpResponseHeadersPtr headers_in,
const WTF::String& mime_type_in,
const WTF::String& charset_in,
::network::mojom::blink::LoadTimingInfoPtr load_timing_in,
uint32_t cert_status_in,
int64_t encoded_data_length_in,
bool was_in_prefetch_cache_in,
bool was_fetched_via_service_worker_in,
const WTF::String& cache_storage_cache_name_in,
const WTF::String& alpn_negotiated_protocol_in,
::net::AlternateProtocolUsage alternate_protocol_usage_in,
bool was_fetched_via_spdy_in,
::network::mojom::blink::FetchResponseSource service_worker_response_source_in,
::network::mojom::blink::ServiceWorkerRouterInfoPtr service_worker_router_info_in,
::network::mojom::blink::SSLInfoPtr ssl_info_in,
const ::net::IPEndPoint& remote_endpoint_in,
bool emitted_extra_info_in)
: … { … }
URLResponseHeadDevToolsInfo::~URLResponseHeadDevToolsInfo() = default;
void URLResponseHeadDevToolsInfo::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool URLResponseHeadDevToolsInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
OtherPartitionInfo::OtherPartitionInfo()
: … { … }
OtherPartitionInfo::OtherPartitionInfo(
bool site_has_cookie_in_other_partition_in)
: … { … }
OtherPartitionInfo::~OtherPartitionInfo() = default;
size_t OtherPartitionInfo::Hash(size_t seed) const { … }
void OtherPartitionInfo::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool OtherPartitionInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char DevToolsObserver::Name_[] = …;
DevToolsObserver::IPCStableHashFunction DevToolsObserver::MessageToMethodInfo_(mojo::Message& message) { … }
const char* DevToolsObserver::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t DevToolsObserver::OnRawRequest_Sym::IPCStableHash() { … }
uint32_t DevToolsObserver::OnRawResponse_Sym::IPCStableHash() { … }
uint32_t DevToolsObserver::OnEarlyHintsResponse_Sym::IPCStableHash() { … }
uint32_t DevToolsObserver::OnPrivateNetworkRequest_Sym::IPCStableHash() { … }
uint32_t DevToolsObserver::OnCorsPreflightRequest_Sym::IPCStableHash() { … }
uint32_t DevToolsObserver::OnCorsPreflightResponse_Sym::IPCStableHash() { … }
uint32_t DevToolsObserver::OnCorsPreflightRequestCompleted_Sym::IPCStableHash() { … }
uint32_t DevToolsObserver::OnTrustTokenOperationDone_Sym::IPCStableHash() { … }
uint32_t DevToolsObserver::OnCorsError_Sym::IPCStableHash() { … }
uint32_t DevToolsObserver::OnOrbError_Sym::IPCStableHash() { … }
uint32_t DevToolsObserver::OnSubresourceWebBundleMetadata_Sym::IPCStableHash() { … }
uint32_t DevToolsObserver::OnSubresourceWebBundleMetadataError_Sym::IPCStableHash() { … }
uint32_t DevToolsObserver::OnSubresourceWebBundleInnerResponse_Sym::IPCStableHash() { … }
uint32_t DevToolsObserver::OnSubresourceWebBundleInnerResponseError_Sym::IPCStableHash() { … }
uint32_t DevToolsObserver::OnSharedDictionaryError_Sym::IPCStableHash() { … }
uint32_t DevToolsObserver::Clone_Sym::IPCStableHash() { … }
# endif
DevToolsObserverProxy::DevToolsObserverProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void DevToolsObserverProxy::OnRawRequest(
const WTF::String& in_devtool_request_id, WTF::Vector<::network::mojom::blink::CookieWithAccessResultPtr> in_cookies_with_access_result, WTF::Vector<::network::mojom::blink::HttpRawHeaderPairPtr> in_headers, ::base::TimeTicks in_timestamp, ::network::mojom::blink::ClientSecurityStatePtr in_client_security_state, OtherPartitionInfoPtr in_other_partition_info) { … }
void DevToolsObserverProxy::OnRawResponse(
const WTF::String& in_devtool_request_id, WTF::Vector<::network::mojom::blink::CookieAndLineWithAccessResultPtr> in_cookies_with_access_result, WTF::Vector<::network::mojom::blink::HttpRawHeaderPairPtr> in_headers, const WTF::String& in_raw_response_headers, ::network::mojom::blink::IPAddressSpace in_resource_address_space, int32_t in_http_status_code, ::network::mojom::blink::CookiePartitionKeyPtr in_cookie_partition_key) { … }
void DevToolsObserverProxy::OnEarlyHintsResponse(
const WTF::String& in_devtool_request_id, WTF::Vector<::network::mojom::blink::HttpRawHeaderPairPtr> in_headers) { … }
void DevToolsObserverProxy::OnPrivateNetworkRequest(
const WTF::String& in_devtool_request_id, const ::blink::KURL& in_url, bool in_is_warning, ::network::mojom::blink::IPAddressSpace in_resource_address_space, ::network::mojom::blink::ClientSecurityStatePtr in_client_security_state) { … }
void DevToolsObserverProxy::OnCorsPreflightRequest(
const ::base::UnguessableToken& in_devtool_request_id, const ::net::HttpRequestHeaders& in_request_headers, URLRequestDevToolsInfoPtr in_request_info, const ::blink::KURL& in_initiator_url, const WTF::String& in_initiator_devtool_request_id) { … }
void DevToolsObserverProxy::OnCorsPreflightResponse(
const ::base::UnguessableToken& in_devtool_request_id, const ::blink::KURL& in_url, URLResponseHeadDevToolsInfoPtr in_head) { … }
void DevToolsObserverProxy::OnCorsPreflightRequestCompleted(
const ::base::UnguessableToken& in_devtool_request_id, const ::network::URLLoaderCompletionStatus& in_status) { … }
void DevToolsObserverProxy::OnTrustTokenOperationDone(
const WTF::String& in_devtool_request_id, ::network::mojom::blink::TrustTokenOperationResultPtr in_result) { … }
void DevToolsObserverProxy::OnCorsError(
const WTF::String& in_devtool_request_id, const ::scoped_refptr<const ::blink::SecurityOrigin>& in_initiator_origin, ::network::mojom::blink::ClientSecurityStatePtr in_client_security_state, const ::blink::KURL& in_url, ::network::mojom::blink::CorsErrorStatusPtr in_status, bool in_is_warning) { … }
void DevToolsObserverProxy::OnOrbError(
const WTF::String& in_devtools_request_id, const ::blink::KURL& in_url) { … }
void DevToolsObserverProxy::OnSubresourceWebBundleMetadata(
const WTF::String& in_devtool_request_id, const WTF::Vector<::blink::KURL>& in_urls) { … }
void DevToolsObserverProxy::OnSubresourceWebBundleMetadataError(
const WTF::String& in_devtool_request_id, const WTF::String& in_error_message) { … }
void DevToolsObserverProxy::OnSubresourceWebBundleInnerResponse(
const WTF::String& in_inner_request_devtools_id, const ::blink::KURL& in_url, const WTF::String& in_bundle_request_devtools_id) { … }
void DevToolsObserverProxy::OnSubresourceWebBundleInnerResponseError(
const WTF::String& in_inner_request_devtools_id, const ::blink::KURL& in_url, const WTF::String& in_error_message, const WTF::String& in_bundle_request_devtools_id) { … }
void DevToolsObserverProxy::OnSharedDictionaryError(
const WTF::String& in_devtool_request_id, const ::blink::KURL& in_url, ::network::mojom::blink::SharedDictionaryError in_error) { … }
void DevToolsObserverProxy::Clone(
::mojo::PendingReceiver<DevToolsObserver> in_listener) { … }
bool DevToolsObserverStubDispatch::Accept(
DevToolsObserver* impl,
mojo::Message* message) { … }
bool DevToolsObserverStubDispatch::AcceptWithResponder(
DevToolsObserver* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kDevToolsObserverValidationInfo[] = …;
bool DevToolsObserverRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::network::mojom::blink::URLRequestDevToolsInfo::DataView, ::network::mojom::blink::URLRequestDevToolsInfoPtr>::Read(
::network::mojom::blink::URLRequestDevToolsInfo::DataView input,
::network::mojom::blink::URLRequestDevToolsInfoPtr* output) { … }
bool StructTraits<::network::mojom::blink::URLResponseHeadDevToolsInfo::DataView, ::network::mojom::blink::URLResponseHeadDevToolsInfoPtr>::Read(
::network::mojom::blink::URLResponseHeadDevToolsInfo::DataView input,
::network::mojom::blink::URLResponseHeadDevToolsInfoPtr* output) { … }
bool StructTraits<::network::mojom::blink::OtherPartitionInfo::DataView, ::network::mojom::blink::OtherPartitionInfoPtr>::Read(
::network::mojom::blink::OtherPartitionInfo::DataView input,
::network::mojom::blink::OtherPartitionInfoPtr* output) { … }
}
namespace network::mojom::blink {
void DevToolsObserverInterceptorForTesting::OnRawRequest(const WTF::String& devtool_request_id, WTF::Vector<::network::mojom::blink::CookieWithAccessResultPtr> cookies_with_access_result, WTF::Vector<::network::mojom::blink::HttpRawHeaderPairPtr> headers, ::base::TimeTicks timestamp, ::network::mojom::blink::ClientSecurityStatePtr client_security_state, OtherPartitionInfoPtr other_partition_info) { … }
void DevToolsObserverInterceptorForTesting::OnRawResponse(const WTF::String& devtool_request_id, WTF::Vector<::network::mojom::blink::CookieAndLineWithAccessResultPtr> cookies_with_access_result, WTF::Vector<::network::mojom::blink::HttpRawHeaderPairPtr> headers, const WTF::String& raw_response_headers, ::network::mojom::blink::IPAddressSpace resource_address_space, int32_t http_status_code, ::network::mojom::blink::CookiePartitionKeyPtr cookie_partition_key) { … }
void DevToolsObserverInterceptorForTesting::OnEarlyHintsResponse(const WTF::String& devtool_request_id, WTF::Vector<::network::mojom::blink::HttpRawHeaderPairPtr> headers) { … }
void DevToolsObserverInterceptorForTesting::OnPrivateNetworkRequest(const WTF::String& devtool_request_id, const ::blink::KURL& url, bool is_warning, ::network::mojom::blink::IPAddressSpace resource_address_space, ::network::mojom::blink::ClientSecurityStatePtr client_security_state) { … }
void DevToolsObserverInterceptorForTesting::OnCorsPreflightRequest(const ::base::UnguessableToken& devtool_request_id, const ::net::HttpRequestHeaders& request_headers, URLRequestDevToolsInfoPtr request_info, const ::blink::KURL& initiator_url, const WTF::String& initiator_devtool_request_id) { … }
void DevToolsObserverInterceptorForTesting::OnCorsPreflightResponse(const ::base::UnguessableToken& devtool_request_id, const ::blink::KURL& url, URLResponseHeadDevToolsInfoPtr head) { … }
void DevToolsObserverInterceptorForTesting::OnCorsPreflightRequestCompleted(const ::base::UnguessableToken& devtool_request_id, const ::network::URLLoaderCompletionStatus& status) { … }
void DevToolsObserverInterceptorForTesting::OnTrustTokenOperationDone(const WTF::String& devtool_request_id, ::network::mojom::blink::TrustTokenOperationResultPtr result) { … }
void DevToolsObserverInterceptorForTesting::OnCorsError(const WTF::String& devtool_request_id, const ::scoped_refptr<const ::blink::SecurityOrigin>& initiator_origin, ::network::mojom::blink::ClientSecurityStatePtr client_security_state, const ::blink::KURL& url, ::network::mojom::blink::CorsErrorStatusPtr status, bool is_warning) { … }
void DevToolsObserverInterceptorForTesting::OnOrbError(const WTF::String& devtools_request_id, const ::blink::KURL& url) { … }
void DevToolsObserverInterceptorForTesting::OnSubresourceWebBundleMetadata(const WTF::String& devtool_request_id, const WTF::Vector<::blink::KURL>& urls) { … }
void DevToolsObserverInterceptorForTesting::OnSubresourceWebBundleMetadataError(const WTF::String& devtool_request_id, const WTF::String& error_message) { … }
void DevToolsObserverInterceptorForTesting::OnSubresourceWebBundleInnerResponse(const WTF::String& inner_request_devtools_id, const ::blink::KURL& url, const WTF::String& bundle_request_devtools_id) { … }
void DevToolsObserverInterceptorForTesting::OnSubresourceWebBundleInnerResponseError(const WTF::String& inner_request_devtools_id, const ::blink::KURL& url, const WTF::String& error_message, const WTF::String& bundle_request_devtools_id) { … }
void DevToolsObserverInterceptorForTesting::OnSharedDictionaryError(const WTF::String& devtool_request_id, const ::blink::KURL& url, ::network::mojom::blink::SharedDictionaryError error) { … }
void DevToolsObserverInterceptorForTesting::Clone(::mojo::PendingReceiver<DevToolsObserver> listener) { … }
DevToolsObserverAsyncWaiter::DevToolsObserverAsyncWaiter(
DevToolsObserver* proxy) : … { … }
DevToolsObserverAsyncWaiter::~DevToolsObserverAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif