#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "chrome/common/importer/profile_import.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 "chrome/common/importer/profile_import.mojom-params-data.h"
#include "chrome/common/importer/profile_import.mojom-shared-message-ids.h"
#include "chrome/common/importer/profile_import.mojom-import-headers.h"
#include "chrome/common/importer/profile_import.mojom-test-utils.h"
#include "chrome/common/importer/profile_import_process_param_traits.h"
#include "chrome/common/importer/profile_import_process_param_traits_macros.h"
namespace chrome::mojom {
ImportedPasswordForm::ImportedPasswordForm()
: … { … }
ImportedPasswordForm::ImportedPasswordForm(
ImportedPasswordForm::Scheme scheme_in,
const std::string& signon_realm_in,
const ::GURL& url_in,
const ::GURL& action_in,
const ::std::u16string& username_element_in,
const ::std::u16string& username_value_in,
const ::std::u16string& password_element_in,
const ::std::u16string& password_value_in,
bool blocked_by_user_in)
: … { … }
ImportedPasswordForm::~ImportedPasswordForm() = default;
void ImportedPasswordForm::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool ImportedPasswordForm::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char ProfileImportObserver::Name_[] = …;
ProfileImportObserver::IPCStableHashFunction ProfileImportObserver::MessageToMethodInfo_(mojo::Message& message) { … }
const char* ProfileImportObserver::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t ProfileImportObserver::OnImportStart_Sym::IPCStableHash() { … }
uint32_t ProfileImportObserver::OnImportFinished_Sym::IPCStableHash() { … }
uint32_t ProfileImportObserver::OnImportItemStart_Sym::IPCStableHash() { … }
uint32_t ProfileImportObserver::OnImportItemFinished_Sym::IPCStableHash() { … }
uint32_t ProfileImportObserver::OnHistoryImportStart_Sym::IPCStableHash() { … }
uint32_t ProfileImportObserver::OnHistoryImportGroup_Sym::IPCStableHash() { … }
uint32_t ProfileImportObserver::OnHomePageImportReady_Sym::IPCStableHash() { … }
uint32_t ProfileImportObserver::OnBookmarksImportStart_Sym::IPCStableHash() { … }
uint32_t ProfileImportObserver::OnBookmarksImportGroup_Sym::IPCStableHash() { … }
uint32_t ProfileImportObserver::OnFaviconsImportStart_Sym::IPCStableHash() { … }
uint32_t ProfileImportObserver::OnFaviconsImportGroup_Sym::IPCStableHash() { … }
uint32_t ProfileImportObserver::OnPasswordFormImportReady_Sym::IPCStableHash() { … }
uint32_t ProfileImportObserver::OnKeywordsImportReady_Sym::IPCStableHash() { … }
uint32_t ProfileImportObserver::OnAutofillFormDataImportStart_Sym::IPCStableHash() { … }
uint32_t ProfileImportObserver::OnAutofillFormDataImportGroup_Sym::IPCStableHash() { … }
# endif
ProfileImportObserverProxy::ProfileImportObserverProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void ProfileImportObserverProxy::OnImportStart(
) { … }
void ProfileImportObserverProxy::OnImportFinished(
bool in_succeeded, const std::string& in_error_msg) { … }
void ProfileImportObserverProxy::OnImportItemStart(
::importer::ImportItem in_item) { … }
void ProfileImportObserverProxy::OnImportItemFinished(
::importer::ImportItem in_item) { … }
void ProfileImportObserverProxy::OnHistoryImportStart(
uint32_t in_total_history_rows_count) { … }
void ProfileImportObserverProxy::OnHistoryImportGroup(
const std::vector<::ImporterURLRow>& in_history_rows_group, int32_t in_visit_source) { … }
void ProfileImportObserverProxy::OnHomePageImportReady(
const ::GURL& in_home_page) { … }
void ProfileImportObserverProxy::OnBookmarksImportStart(
const ::std::u16string& in_first_folder_name, uint32_t in_total_bookmarks_count) { … }
void ProfileImportObserverProxy::OnBookmarksImportGroup(
const std::vector<::ImportedBookmarkEntry>& in_bookmarks_group) { … }
void ProfileImportObserverProxy::OnFaviconsImportStart(
uint32_t in_total_favicons_count) { … }
void ProfileImportObserverProxy::OnFaviconsImportGroup(
const ::favicon_base::FaviconUsageDataList& in_favicons_group) { … }
void ProfileImportObserverProxy::OnPasswordFormImportReady(
const ::importer::ImportedPasswordForm& in_form) { … }
void ProfileImportObserverProxy::OnKeywordsImportReady(
const std::vector<::importer::SearchEngineInfo>& in_search_engines, bool in_unique_on_host_and_path) { … }
void ProfileImportObserverProxy::OnAutofillFormDataImportStart(
uint32_t in_total_autofill_form_data_entry_count) { … }
void ProfileImportObserverProxy::OnAutofillFormDataImportGroup(
const std::vector<::ImporterAutofillFormDataEntry>& in_autofill_form_data_entry_group) { … }
bool ProfileImportObserverStubDispatch::Accept(
ProfileImportObserver* impl,
mojo::Message* message) { … }
bool ProfileImportObserverStubDispatch::AcceptWithResponder(
ProfileImportObserver* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kProfileImportObserverValidationInfo[] = …;
bool ProfileImportObserverRequestValidator::Accept(mojo::Message* message) { … }
const char ProfileImport::Name_[] = …;
ProfileImport::IPCStableHashFunction ProfileImport::MessageToMethodInfo_(mojo::Message& message) { … }
const char* ProfileImport::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t ProfileImport::StartImport_Sym::IPCStableHash() { … }
uint32_t ProfileImport::CancelImport_Sym::IPCStableHash() { … }
uint32_t ProfileImport::ReportImportItemFinished_Sym::IPCStableHash() { … }
# endif
ProfileImportProxy::ProfileImportProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void ProfileImportProxy::StartImport(
const ::importer::SourceProfile& in_source_profile, uint16_t in_items, const base::flat_map<uint32_t, std::string>& in_localized_strings, ::mojo::PendingRemote<ProfileImportObserver> in_observer) { … }
void ProfileImportProxy::CancelImport(
) { … }
void ProfileImportProxy::ReportImportItemFinished(
::importer::ImportItem in_item) { … }
bool ProfileImportStubDispatch::Accept(
ProfileImport* impl,
mojo::Message* message) { … }
bool ProfileImportStubDispatch::AcceptWithResponder(
ProfileImport* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kProfileImportValidationInfo[] = …;
bool ProfileImportRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::chrome::mojom::ImportedPasswordForm::DataView, ::chrome::mojom::ImportedPasswordFormPtr>::Read(
::chrome::mojom::ImportedPasswordForm::DataView input,
::chrome::mojom::ImportedPasswordFormPtr* output) { … }
}
namespace chrome::mojom {
void ProfileImportObserverInterceptorForTesting::OnImportStart() { … }
void ProfileImportObserverInterceptorForTesting::OnImportFinished(bool succeeded, const std::string& error_msg) { … }
void ProfileImportObserverInterceptorForTesting::OnImportItemStart(::importer::ImportItem item) { … }
void ProfileImportObserverInterceptorForTesting::OnImportItemFinished(::importer::ImportItem item) { … }
void ProfileImportObserverInterceptorForTesting::OnHistoryImportStart(uint32_t total_history_rows_count) { … }
void ProfileImportObserverInterceptorForTesting::OnHistoryImportGroup(const std::vector<::ImporterURLRow>& history_rows_group, int32_t visit_source) { … }
void ProfileImportObserverInterceptorForTesting::OnHomePageImportReady(const ::GURL& home_page) { … }
void ProfileImportObserverInterceptorForTesting::OnBookmarksImportStart(const ::std::u16string& first_folder_name, uint32_t total_bookmarks_count) { … }
void ProfileImportObserverInterceptorForTesting::OnBookmarksImportGroup(const std::vector<::ImportedBookmarkEntry>& bookmarks_group) { … }
void ProfileImportObserverInterceptorForTesting::OnFaviconsImportStart(uint32_t total_favicons_count) { … }
void ProfileImportObserverInterceptorForTesting::OnFaviconsImportGroup(const ::favicon_base::FaviconUsageDataList& favicons_group) { … }
void ProfileImportObserverInterceptorForTesting::OnPasswordFormImportReady(const ::importer::ImportedPasswordForm& form) { … }
void ProfileImportObserverInterceptorForTesting::OnKeywordsImportReady(const std::vector<::importer::SearchEngineInfo>& search_engines, bool unique_on_host_and_path) { … }
void ProfileImportObserverInterceptorForTesting::OnAutofillFormDataImportStart(uint32_t total_autofill_form_data_entry_count) { … }
void ProfileImportObserverInterceptorForTesting::OnAutofillFormDataImportGroup(const std::vector<::ImporterAutofillFormDataEntry>& autofill_form_data_entry_group) { … }
ProfileImportObserverAsyncWaiter::ProfileImportObserverAsyncWaiter(
ProfileImportObserver* proxy) : … { … }
ProfileImportObserverAsyncWaiter::~ProfileImportObserverAsyncWaiter() = default;
void ProfileImportInterceptorForTesting::StartImport(const ::importer::SourceProfile& source_profile, uint16_t items, const base::flat_map<uint32_t, std::string>& localized_strings, ::mojo::PendingRemote<ProfileImportObserver> observer) { … }
void ProfileImportInterceptorForTesting::CancelImport() { … }
void ProfileImportInterceptorForTesting::ReportImportItemFinished(::importer::ImportItem item) { … }
ProfileImportAsyncWaiter::ProfileImportAsyncWaiter(
ProfileImport* proxy) : … { … }
ProfileImportAsyncWaiter::~ProfileImportAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif