#ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_PREFERENCES_HELPER_H_
#define CHROME_BROWSER_SYNC_TEST_INTEGRATION_PREFERENCES_HELPER_H_
#include <stdint.h>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include "base/memory/scoped_refptr.h"
#include "base/values.h"
#include "chrome/browser/sync/test/integration/fake_server_match_status_checker.h"
#include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
#include "chrome/browser/sync/test/integration/status_change_checker.h"
#include "components/prefs/json_pref_store.h"
#include "components/prefs/pref_change_registrar.h"
#include "components/sync/base/data_type.h"
#include "components/sync/protocol/preference_specifics.pb.h"
#include "components/sync/test/fake_server.h"
class PrefChangeRegistrar;
class PrefService;
class Profile;
namespace user_prefs {
class PrefRegistrySyncable;
}
namespace preferences_helper {
PrefService* GetPrefs(int index);
user_prefs::PrefRegistrySyncable* GetRegistry(Profile* profile);
void ChangeBooleanPref(int index, const char* pref_name);
void ChangeIntegerPref(int index, const char* pref_name, int new_value);
void ChangeStringPref(int index,
const char* pref_name,
const std::string& new_value);
void ClearPref(int index, const char* pref_name);
void ChangeListPref(int index,
const char* pref_name,
const base::Value::List& new_value);
[[nodiscard]] bool BooleanPrefMatches(const char* pref_name);
[[nodiscard]] bool IntegerPrefMatches(const char* pref_name);
[[nodiscard]] bool StringPrefMatches(const char* pref_name);
[[nodiscard]] bool ListPrefMatches(const char* pref_name);
std::optional<sync_pb::PreferenceSpecifics> GetPreferenceInFakeServer(
syncer::DataType data_type,
const std::string& pref_name,
fake_server::FakeServer* fake_server);
std::string ConvertPrefValueToValueInSpecifics(const base::Value& value);
}
class BooleanPrefValueChecker : public StatusChangeChecker { … };
class PrefMatchChecker : public StatusChangeChecker { … };
class ListPrefMatchChecker : public PrefMatchChecker { … };
class BooleanPrefMatchChecker : public PrefMatchChecker { … };
class IntegerPrefMatchChecker : public PrefMatchChecker { … };
class StringPrefMatchChecker : public PrefMatchChecker { … };
class ClearedPrefMatchChecker : public PrefMatchChecker { … };
class FakeServerPrefMatchesValueChecker
: public fake_server::FakeServerMatchStatusChecker { … };
#endif