#include "components/reporting/client/report_queue.h"
#include <memory>
#include <string>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/json/json_writer.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_functions.h"
#include "base/sequence_checker.h"
#include "base/strings/strcat.h"
#include "base/time/time.h"
#include "base/types/expected.h"
#include "base/values.h"
#include "components/reporting/proto/synced/record.pb.h"
#include "components/reporting/proto/synced/record_constants.pb.h"
#include "components/reporting/util/status.h"
#include "components/reporting/util/status_macros.h"
#include "components/reporting/util/statusor.h"
namespace reporting {
namespace {
StatusOr<std::string> ValueToJson(base::Value::Dict record) { … }
StatusOr<std::string> ProtoToString(
std::unique_ptr<const google::protobuf::MessageLite> record) { … }
void EnqueueResponded(ReportQueue::EnqueueCallback callback,
Destination destination,
Status status) { … }
}
ReportQueue::~ReportQueue() = default;
void ReportQueue::Enqueue(std::string record,
Priority priority,
ReportQueue::EnqueueCallback callback) const { … }
void ReportQueue::Enqueue(base::Value::Dict record,
Priority priority,
ReportQueue::EnqueueCallback callback) const { … }
void ReportQueue::Enqueue(
std::unique_ptr<const google::protobuf::MessageLite> record,
Priority priority,
ReportQueue::EnqueueCallback callback) const { … }
}