chromium/chrome/browser/policy/messaging_layer/upload/server_uploader.h

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_POLICY_MESSAGING_LAYER_UPLOAD_SERVER_UPLOADER_H_
#define CHROME_BROWSER_POLICY_MESSAGING_LAYER_UPLOAD_SERVER_UPLOADER_H_

#include <memory>
#include <vector>

#include "base/memory/raw_ptr.h"
#include "base/sequence_checker.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_runner.h"
#include "base/thread_annotations.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/policy/messaging_layer/util/upload_declarations.h"
#include "components/reporting/proto/synced/configuration_file.pb.h"
#include "components/reporting/proto/synced/record.pb.h"
#include "components/reporting/proto/synced/record_constants.pb.h"
#include "components/reporting/resources/resource_manager.h"
#include "components/reporting/util/status.h"
#include "components/reporting/util/statusor.h"
#include "components/reporting/util/task_runner_context.h"
#include "net/base/backoff_entry.h"

namespace reporting {

// UpdateConfigInMissiveCallback is called if the configuration file obtained
// from the server is different from the one that was sent previously using
// this callback.
UpdateConfigInMissiveCallback;

// Successful response consists of Sequence information that may be
// accompanied with force_confirm flag.
struct SuccessfulUploadResponse {};
CompletionResponse;

CompletionCallback;

// `ServerUploader` uploads events to the Reporting Server. It is provided with
// `RecordHandler` instance, as well as with the flags and records for upload.
// It processes records by verifying that they are parseable and sending them
// to the appropriate handler. Called from the `UploadClient`, so we can reuse
// the same sequence task runner.
// Results are passed via callbacks.
class ServerUploader : public TaskRunnerContext<CompletionResponse> {};

}  // namespace reporting

#endif  // CHROME_BROWSER_POLICY_MESSAGING_LAYER_UPLOAD_SERVER_UPLOADER_H_