#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "services/device/public/mojom/fingerprint.mojom.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/device/public/mojom/fingerprint.mojom-params-data.h"
#include "services/device/public/mojom/fingerprint.mojom-shared-message-ids.h"
#include "services/device/public/mojom/fingerprint.mojom-import-headers.h"
#include "services/device/public/mojom/fingerprint.mojom-test-utils.h"
namespace device::mojom {
FingerprintMessage::FingerprintMessage() : … { … }
FingerprintMessage::~FingerprintMessage() { … }
void FingerprintMessage::set_fingerprint_error(
FingerprintError fingerprint_error) { … }
void FingerprintMessage::set_scan_result(
ScanResult scan_result) { … }
void FingerprintMessage::DestroyActive() { … }
size_t FingerprintMessage::Hash(size_t seed) const { … }
bool FingerprintMessage::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char FingerprintObserver::Name_[] = …;
FingerprintObserver::IPCStableHashFunction FingerprintObserver::MessageToMethodInfo_(mojo::Message& message) { … }
const char* FingerprintObserver::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t FingerprintObserver::OnRestarted_Sym::IPCStableHash() { … }
uint32_t FingerprintObserver::OnStatusChanged_Sym::IPCStableHash() { … }
uint32_t FingerprintObserver::OnEnrollScanDone_Sym::IPCStableHash() { … }
uint32_t FingerprintObserver::OnAuthScanDone_Sym::IPCStableHash() { … }
uint32_t FingerprintObserver::OnSessionFailed_Sym::IPCStableHash() { … }
# endif
FingerprintObserverProxy::FingerprintObserverProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void FingerprintObserverProxy::OnRestarted(
) { … }
void FingerprintObserverProxy::OnStatusChanged(
BiometricsManagerStatus in_status) { … }
void FingerprintObserverProxy::OnEnrollScanDone(
ScanResult in_scan_result, bool in_is_complete, int32_t in_percent_complete) { … }
void FingerprintObserverProxy::OnAuthScanDone(
FingerprintMessagePtr in_msg, const base::flat_map<std::string, std::vector<std::string>>& in_matches) { … }
void FingerprintObserverProxy::OnSessionFailed(
) { … }
bool FingerprintObserverStubDispatch::Accept(
FingerprintObserver* impl,
mojo::Message* message) { … }
bool FingerprintObserverStubDispatch::AcceptWithResponder(
FingerprintObserver* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kFingerprintObserverValidationInfo[] = …;
bool FingerprintObserverRequestValidator::Accept(mojo::Message* message) { … }
const char Fingerprint::Name_[] = …;
Fingerprint::IPCStableHashFunction Fingerprint::MessageToMethodInfo_(mojo::Message& message) { … }
const char* Fingerprint::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t Fingerprint::GetRecordsForUser_Sym::IPCStableHash() { … }
uint32_t Fingerprint::StartEnrollSession_Sym::IPCStableHash() { … }
uint32_t Fingerprint::CancelCurrentEnrollSession_Sym::IPCStableHash() { … }
uint32_t Fingerprint::RequestRecordLabel_Sym::IPCStableHash() { … }
uint32_t Fingerprint::SetRecordLabel_Sym::IPCStableHash() { … }
uint32_t Fingerprint::RemoveRecord_Sym::IPCStableHash() { … }
uint32_t Fingerprint::StartAuthSession_Sym::IPCStableHash() { … }
uint32_t Fingerprint::EndCurrentAuthSession_Sym::IPCStableHash() { … }
uint32_t Fingerprint::DestroyAllRecords_Sym::IPCStableHash() { … }
uint32_t Fingerprint::AddFingerprintObserver_Sym::IPCStableHash() { … }
uint32_t Fingerprint::RequestType_Sym::IPCStableHash() { … }
# endif
class Fingerprint_GetRecordsForUser_ForwardToCallback
: public mojo::MessageReceiver { … };
class Fingerprint_CancelCurrentEnrollSession_ForwardToCallback
: public mojo::MessageReceiver { … };
class Fingerprint_RequestRecordLabel_ForwardToCallback
: public mojo::MessageReceiver { … };
class Fingerprint_SetRecordLabel_ForwardToCallback
: public mojo::MessageReceiver { … };
class Fingerprint_RemoveRecord_ForwardToCallback
: public mojo::MessageReceiver { … };
class Fingerprint_EndCurrentAuthSession_ForwardToCallback
: public mojo::MessageReceiver { … };
class Fingerprint_DestroyAllRecords_ForwardToCallback
: public mojo::MessageReceiver { … };
class Fingerprint_RequestType_ForwardToCallback
: public mojo::MessageReceiver { … };
FingerprintProxy::FingerprintProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void FingerprintProxy::GetRecordsForUser(
const std::string& in_user_id, GetRecordsForUserCallback callback) { … }
void FingerprintProxy::StartEnrollSession(
const std::string& in_user_id, const std::string& in_label) { … }
void FingerprintProxy::CancelCurrentEnrollSession(
CancelCurrentEnrollSessionCallback callback) { … }
void FingerprintProxy::RequestRecordLabel(
const std::string& in_record_path, RequestRecordLabelCallback callback) { … }
void FingerprintProxy::SetRecordLabel(
const std::string& in_record_path, const std::string& in_new_label, SetRecordLabelCallback callback) { … }
void FingerprintProxy::RemoveRecord(
const std::string& in_record_path, RemoveRecordCallback callback) { … }
void FingerprintProxy::StartAuthSession(
) { … }
void FingerprintProxy::EndCurrentAuthSession(
EndCurrentAuthSessionCallback callback) { … }
void FingerprintProxy::DestroyAllRecords(
DestroyAllRecordsCallback callback) { … }
void FingerprintProxy::AddFingerprintObserver(
::mojo::PendingRemote<FingerprintObserver> in_observer) { … }
void FingerprintProxy::RequestType(
RequestTypeCallback callback) { … }
class Fingerprint_GetRecordsForUser_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool Fingerprint_GetRecordsForUser_ForwardToCallback::Accept(
mojo::Message* message) { … }
void Fingerprint_GetRecordsForUser_ProxyToResponder::Run(
const base::flat_map<std::string, std::string>& in_records, bool in_success) { … }
class Fingerprint_CancelCurrentEnrollSession_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool Fingerprint_CancelCurrentEnrollSession_ForwardToCallback::Accept(
mojo::Message* message) { … }
void Fingerprint_CancelCurrentEnrollSession_ProxyToResponder::Run(
bool in_success) { … }
class Fingerprint_RequestRecordLabel_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool Fingerprint_RequestRecordLabel_ForwardToCallback::Accept(
mojo::Message* message) { … }
void Fingerprint_RequestRecordLabel_ProxyToResponder::Run(
const std::string& in_label) { … }
class Fingerprint_SetRecordLabel_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool Fingerprint_SetRecordLabel_ForwardToCallback::Accept(
mojo::Message* message) { … }
void Fingerprint_SetRecordLabel_ProxyToResponder::Run(
bool in_success) { … }
class Fingerprint_RemoveRecord_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool Fingerprint_RemoveRecord_ForwardToCallback::Accept(
mojo::Message* message) { … }
void Fingerprint_RemoveRecord_ProxyToResponder::Run(
bool in_success) { … }
class Fingerprint_EndCurrentAuthSession_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool Fingerprint_EndCurrentAuthSession_ForwardToCallback::Accept(
mojo::Message* message) { … }
void Fingerprint_EndCurrentAuthSession_ProxyToResponder::Run(
bool in_success) { … }
class Fingerprint_DestroyAllRecords_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool Fingerprint_DestroyAllRecords_ForwardToCallback::Accept(
mojo::Message* message) { … }
void Fingerprint_DestroyAllRecords_ProxyToResponder::Run(
bool in_success) { … }
class Fingerprint_RequestType_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool Fingerprint_RequestType_ForwardToCallback::Accept(
mojo::Message* message) { … }
void Fingerprint_RequestType_ProxyToResponder::Run(
BiometricType in_type) { … }
bool FingerprintStubDispatch::Accept(
Fingerprint* impl,
mojo::Message* message) { … }
bool FingerprintStubDispatch::AcceptWithResponder(
Fingerprint* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kFingerprintValidationInfo[] = …;
bool FingerprintRequestValidator::Accept(mojo::Message* message) { … }
bool FingerprintResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool UnionTraits<::device::mojom::FingerprintMessage::DataView, ::device::mojom::FingerprintMessagePtr>::Read(
::device::mojom::FingerprintMessage::DataView input,
::device::mojom::FingerprintMessagePtr* output) { … }
}
namespace device::mojom {
void FingerprintObserverInterceptorForTesting::OnRestarted() { … }
void FingerprintObserverInterceptorForTesting::OnStatusChanged(BiometricsManagerStatus status) { … }
void FingerprintObserverInterceptorForTesting::OnEnrollScanDone(ScanResult scan_result, bool is_complete, int32_t percent_complete) { … }
void FingerprintObserverInterceptorForTesting::OnAuthScanDone(FingerprintMessagePtr msg, const base::flat_map<std::string, std::vector<std::string>>& matches) { … }
void FingerprintObserverInterceptorForTesting::OnSessionFailed() { … }
FingerprintObserverAsyncWaiter::FingerprintObserverAsyncWaiter(
FingerprintObserver* proxy) : … { … }
FingerprintObserverAsyncWaiter::~FingerprintObserverAsyncWaiter() = default;
void FingerprintInterceptorForTesting::GetRecordsForUser(const std::string& user_id, GetRecordsForUserCallback callback) { … }
void FingerprintInterceptorForTesting::StartEnrollSession(const std::string& user_id, const std::string& label) { … }
void FingerprintInterceptorForTesting::CancelCurrentEnrollSession(CancelCurrentEnrollSessionCallback callback) { … }
void FingerprintInterceptorForTesting::RequestRecordLabel(const std::string& record_path, RequestRecordLabelCallback callback) { … }
void FingerprintInterceptorForTesting::SetRecordLabel(const std::string& record_path, const std::string& new_label, SetRecordLabelCallback callback) { … }
void FingerprintInterceptorForTesting::RemoveRecord(const std::string& record_path, RemoveRecordCallback callback) { … }
void FingerprintInterceptorForTesting::StartAuthSession() { … }
void FingerprintInterceptorForTesting::EndCurrentAuthSession(EndCurrentAuthSessionCallback callback) { … }
void FingerprintInterceptorForTesting::DestroyAllRecords(DestroyAllRecordsCallback callback) { … }
void FingerprintInterceptorForTesting::AddFingerprintObserver(::mojo::PendingRemote<FingerprintObserver> observer) { … }
void FingerprintInterceptorForTesting::RequestType(RequestTypeCallback callback) { … }
FingerprintAsyncWaiter::FingerprintAsyncWaiter(
Fingerprint* proxy) : … { … }
FingerprintAsyncWaiter::~FingerprintAsyncWaiter() = default;
void FingerprintAsyncWaiter::GetRecordsForUser(
const std::string& user_id, base::flat_map<std::string, std::string>* out_records, bool* out_success) { … }
void FingerprintAsyncWaiter::CancelCurrentEnrollSession(
bool* out_success) { … }
bool FingerprintAsyncWaiter::CancelCurrentEnrollSession(
) { … }
void FingerprintAsyncWaiter::RequestRecordLabel(
const std::string& record_path, std::string* out_label) { … }
std::string FingerprintAsyncWaiter::RequestRecordLabel(
const std::string& record_path) { … }
void FingerprintAsyncWaiter::SetRecordLabel(
const std::string& record_path, const std::string& new_label, bool* out_success) { … }
bool FingerprintAsyncWaiter::SetRecordLabel(
const std::string& record_path, const std::string& new_label) { … }
void FingerprintAsyncWaiter::RemoveRecord(
const std::string& record_path, bool* out_success) { … }
bool FingerprintAsyncWaiter::RemoveRecord(
const std::string& record_path) { … }
void FingerprintAsyncWaiter::EndCurrentAuthSession(
bool* out_success) { … }
bool FingerprintAsyncWaiter::EndCurrentAuthSession(
) { … }
void FingerprintAsyncWaiter::DestroyAllRecords(
bool* out_success) { … }
bool FingerprintAsyncWaiter::DestroyAllRecords(
) { … }
void FingerprintAsyncWaiter::RequestType(
BiometricType* out_type) { … }
BiometricType FingerprintAsyncWaiter::RequestType(
) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif