#include "ui/base/data_transfer_policy/data_transfer_endpoint_serializer.h"
#include <optional>
#include <string>
#include <string_view>
#include "base/containers/fixed_flat_map.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/values.h"
#include "build/build_config.h"
#include "ui/base/data_transfer_policy/data_transfer_endpoint.h"
#include "url/gurl.h"
namespace ui {
namespace {
constexpr char kEndpointTypeKey[] = …;
constexpr char kUrlKey[] = …;
constexpr char kOffTheRecord[] = …;
constexpr char kDefaultString[] = …;
constexpr char kUrlString[] = …;
constexpr char kClipboardHistoryString[] = …;
#if BUILDFLAG(IS_CHROMEOS)
constexpr char kUnknownVmString[] = "unknown_vm";
constexpr char kArcString[] = "arc";
constexpr char kBorealisString[] = "borealis";
constexpr char kCrostiniString[] = "crostini";
constexpr char kPluginVmString[] = "plugin_vm";
constexpr char kLacrosString[] = "lacros";
#endif
std::string EndpointTypeToString(EndpointType type) { … }
std::optional<EndpointType> EndpointStringToType(
const std::string& endpoint_string) { … }
}
std::string ConvertDataTransferEndpointToJson(const DataTransferEndpoint& dte) { … }
std::unique_ptr<DataTransferEndpoint> ConvertJsonToDataTransferEndpoint(
std::string json) { … }
}