#ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_PASSWORDS_HELPER_H_
#define CHROME_BROWSER_SYNC_TEST_INTEGRATION_PASSWORDS_HELPER_H_
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include "chrome/browser/sync/test/integration/fake_server_match_status_checker.h"
#include "chrome/browser/sync/test/integration/multi_client_status_change_checker.h"
#include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "components/password_manager/core/browser/password_form.h"
#include "components/password_manager/core/browser/password_store/password_store_interface.h"
namespace syncer {
class Cryptographer;
class KeyDerivationParams;
class SyncServiceImpl;
}
namespace password_manager {
class PasswordStoreInterface;
}
namespace passwords_helper {
std::vector<std::unique_ptr<password_manager::PasswordForm>> GetLogins(
password_manager::PasswordStoreInterface* store);
std::vector<std::unique_ptr<password_manager::PasswordForm>> GetAllLogins(
password_manager::PasswordStoreInterface* store);
void RemoveLogins(password_manager::PasswordStoreInterface* store);
password_manager::PasswordStoreInterface* GetProfilePasswordStoreInterface(
int index);
password_manager::PasswordStoreInterface*
GetVerifierProfilePasswordStoreInterface();
password_manager::PasswordStoreInterface* GetAccountPasswordStoreInterface(
int index);
password_manager::PasswordStoreInterface* GetPasswordStoreInterface(
int index,
password_manager::PasswordForm::Store store);
bool ProfileContainsSamePasswordFormsAsVerifier(int index);
bool ProfilesContainSamePasswordForms(
int index_a,
int index_b,
password_manager::PasswordForm::Store store =
password_manager::PasswordForm::Store::kProfileStore);
bool AllProfilesContainSamePasswordFormsAsVerifier();
bool AllProfilesContainSamePasswordForms(
password_manager::PasswordForm::Store store =
password_manager::PasswordForm::Store::kProfileStore);
bool AwaitProfileContainsSamePasswordFormsAsVerifier(int index);
int GetPasswordCount(int index,
password_manager::PasswordForm::Store store =
password_manager::PasswordForm::Store::kProfileStore);
int GetVerifierPasswordCount();
password_manager::PasswordForm CreateTestPasswordForm(int index);
void InjectEncryptedServerPassword(
const password_manager::PasswordForm& form,
const std::string& encryption_passphrase,
const syncer::KeyDerivationParams& key_derivation_params,
fake_server::FakeServer* fake_server);
void InjectEncryptedServerPassword(
const sync_pb::PasswordSpecificsData& password_data,
const std::string& encryption_passphrase,
const syncer::KeyDerivationParams& key_derivation_params,
fake_server::FakeServer* fake_server);
void InjectKeystoreEncryptedServerPassword(
const password_manager::PasswordForm& form,
fake_server::FakeServer* fake_server);
void InjectKeystoreEncryptedServerPassword(
const sync_pb::PasswordSpecificsData& password_data,
fake_server::FakeServer* fake_server);
}
class PasswordSyncActiveChecker : public SingleClientStatusChangeChecker { … };
class PasswordSyncInactiveChecker : public SingleClientStatusChangeChecker { … };
class SamePasswordFormsChecker : public MultiClientStatusChangeChecker { … };
class SamePasswordFormsAsVerifierChecker
: public SingleClientStatusChangeChecker { … };
class PasswordFormsChecker : public SingleClientStatusChangeChecker { … };
class ServerPasswordsEqualityChecker
: public fake_server::FakeServerMatchStatusChecker { … };
class PasswordFormsAddedChecker
: public StatusChangeChecker,
public password_manager::PasswordStoreInterface::Observer { … };
#endif