#ifndef CHROME_ENTERPRISE_COMPANION_EVENT_LOGGER_H_
#define CHROME_ENTERPRISE_COMPANION_EVENT_LOGGER_H_
#include <memory>
#include <optional>
#include <string>
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/platform_file.h"
#include "base/functional/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_refptr.h"
#include "base/threading/sequence_bound.h"
#include "base/time/default_clock.h"
#include "base/time/time.h"
#include "chrome/enterprise_companion/enterprise_companion_status.h"
#include "chrome/enterprise_companion/proto/log_request.pb.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/struct_ptr.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/mojom/cookie_manager.mojom.h"
namespace base {
class Clock;
}
namespace network::mojom {
class URLResponseHead;
}
namespace enterprise_companion {
extern const char kLoggingCookieName[];
extern const char kLoggingCookieDefaultValue[];
class EventLogger : public base::RefCountedThreadSafe<EventLogger> { … };
class EventLoggerManager { … };
class EventLogUploader { … };
class EventLoggerCookieHandler { … };
std::unique_ptr<EventLoggerManager> CreateEventLoggerManager(
std::unique_ptr<EventLogUploader> uploader,
const base::Clock* clock = base::DefaultClock::GetInstance());
std::unique_ptr<EventLogUploader> CreateEventLogUploader(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory);
std::optional<base::File> OpenDefaultEventLoggerCookieFile();
base::SequenceBound<EventLoggerCookieHandler> CreateEventLoggerCookieHandler(
std::optional<base::File> logging_cookie_file =
OpenDefaultEventLoggerCookieFile());
}
#endif