chromium/chrome/updater/persisted_data.h

// Copyright 2020 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_UPDATER_PERSISTED_DATA_H_
#define CHROME_UPDATER_PERSISTED_DATA_H_

#include <memory>
#include <optional>
#include <string>
#include <vector>

#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/sequence_checker.h"
#include "base/values.h"
#include "chrome/updater/updater_scope.h"
#include "components/update_client/persisted_data.h"

#if BUILDFLAG(IS_WIN)
#include <windows.h>
#endif

class PrefService;
class PrefRegistrySimple;

namespace base {
class FilePath;
class Time;
class Version;
}  // namespace base

namespace update_client {
class ActivityDataService;
struct CategorizedError;
}  // namespace update_client

namespace updater {

struct RegistrationRequest;

// PersistedData uses the PrefService to persist updater data that outlives
// the updater processes.
class PersistedData : public base::RefCountedThreadSafe<PersistedData>,
                      public update_client::PersistedData {};

void RegisterPersistedDataPrefs(scoped_refptr<PrefRegistrySimple> registry);

}  // namespace updater

#endif  // CHROME_UPDATER_PERSISTED_DATA_H_