#include "chrome/browser/policy/messaging_layer/upload/record_upload_request_builder.h"
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include "base/base64.h"
#include "base/feature_list.h"
#include "base/strings/string_number_conversions.h"
#include "base/token.h"
#include "base/values.h"
#include "build/build_config.h"
#include "components/reporting/proto/synced/record.pb.h"
#include "components/reporting/util/encrypted_reporting_json_keys.h"
#include "content/public/browser/browser_thread.h"
namespace reporting {
BASE_FEATURE(…);
BASE_FEATURE(…);
UploadEncryptedReportingRequestBuilder::UploadEncryptedReportingRequestBuilder(
bool is_generation_guid_required,
bool attach_encryption_settings,
int config_file_version)
: … { … }
UploadEncryptedReportingRequestBuilder::
~UploadEncryptedReportingRequestBuilder() = default;
UploadEncryptedReportingRequestBuilder&
UploadEncryptedReportingRequestBuilder::AddRecord(
EncryptedRecord record,
ScopedReservation& scoped_reservation) { … }
UploadEncryptedReportingRequestBuilder&
UploadEncryptedReportingRequestBuilder::SetRequestId(
std::string_view request_id) { … }
std::optional<base::Value::Dict>
UploadEncryptedReportingRequestBuilder::Build() { … }
std::string_view
UploadEncryptedReportingRequestBuilder::GetEncryptedRecordListPath() { … }
std::string_view
UploadEncryptedReportingRequestBuilder::GetAttachEncryptionSettingsPath() { … }
std::string_view
UploadEncryptedReportingRequestBuilder::GetConfigurationFileVersionPath() { … }
std::string_view UploadEncryptedReportingRequestBuilder::GetSourcePath() { … }
EncryptedRecordDictionaryBuilder::EncryptedRecordDictionaryBuilder(
EncryptedRecord record,
ScopedReservation& scoped_reservation,
bool is_generation_guid_required) { … }
EncryptedRecordDictionaryBuilder::~EncryptedRecordDictionaryBuilder() = default;
std::optional<base::Value::Dict> EncryptedRecordDictionaryBuilder::Build() { … }
std::string_view
EncryptedRecordDictionaryBuilder::GetEncryptedWrappedRecordPath() { … }
std::string_view
EncryptedRecordDictionaryBuilder::GetSequenceInformationKeyPath() { … }
std::string_view EncryptedRecordDictionaryBuilder::GetEncryptionInfoPath() { … }
std::string_view
EncryptedRecordDictionaryBuilder::GetCompressionInformationPath() { … }
SequenceInformationDictionaryBuilder::SequenceInformationDictionaryBuilder(
const SequenceInformation& sequence_information,
bool is_generation_guid_required) { … }
SequenceInformationDictionaryBuilder::~SequenceInformationDictionaryBuilder() =
default;
std::optional<base::Value::Dict> SequenceInformationDictionaryBuilder::Build() { … }
std::string_view SequenceInformationDictionaryBuilder::GetSequencingIdPath() { … }
std::string_view SequenceInformationDictionaryBuilder::GetGenerationIdPath() { … }
std::string_view SequenceInformationDictionaryBuilder::GetPriorityPath() { … }
#if BUILDFLAG(IS_CHROMEOS)
std::string_view SequenceInformationDictionaryBuilder::GetGenerationGuidPath() {
return json_keys::kGenerationGuid;
}
#endif
EncryptionInfoDictionaryBuilder::EncryptionInfoDictionaryBuilder(
const EncryptionInfo& encryption_info) { … }
EncryptionInfoDictionaryBuilder::~EncryptionInfoDictionaryBuilder() = default;
std::optional<base::Value::Dict> EncryptionInfoDictionaryBuilder::Build() { … }
std::string_view EncryptionInfoDictionaryBuilder::GetEncryptionKeyPath() { … }
std::string_view EncryptionInfoDictionaryBuilder::GetPublicKeyIdPath() { … }
CompressionInformationDictionaryBuilder::
CompressionInformationDictionaryBuilder(
const CompressionInformation& compression_information) { … }
CompressionInformationDictionaryBuilder::
~CompressionInformationDictionaryBuilder() = default;
std::optional<base::Value::Dict>
CompressionInformationDictionaryBuilder::Build() { … }
std::string_view
CompressionInformationDictionaryBuilder::GetCompressionAlgorithmPath() { … }
}