mock_trusted_vault_client.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_SYNC_DRIVER_MOCK_TRUSTED_VAULT_CLIENT_H_
  5. #define COMPONENTS_SYNC_DRIVER_MOCK_TRUSTED_VAULT_CLIENT_H_
  6. #include <string>
  7. #include <vector>
  8. #include "base/callback.h"
  9. #include "components/sync/driver/trusted_vault_client.h"
  10. #include "testing/gmock/include/gmock/gmock.h"
  11. namespace syncer {
  12. class MockTrustedVaultClient : public TrustedVaultClient {
  13. public:
  14. MockTrustedVaultClient();
  15. ~MockTrustedVaultClient() override;
  16. MOCK_METHOD(void, AddObserver, (Observer*), (override));
  17. MOCK_METHOD(void, RemoveObserver, (Observer*), (override));
  18. MOCK_METHOD(
  19. void,
  20. FetchKeys,
  21. (const CoreAccountInfo&,
  22. base::OnceCallback<void(const std::vector<std::vector<uint8_t>>&)>),
  23. (override));
  24. MOCK_METHOD(void,
  25. MarkLocalKeysAsStale,
  26. (const CoreAccountInfo&, base::OnceCallback<void(bool)>),
  27. (override));
  28. MOCK_METHOD(void,
  29. StoreKeys,
  30. (const std::string&,
  31. const std::vector<std::vector<uint8_t>>&,
  32. int),
  33. (override));
  34. MOCK_METHOD(void,
  35. GetIsRecoverabilityDegraded,
  36. (const CoreAccountInfo&, base::OnceCallback<void(bool)>),
  37. (override));
  38. MOCK_METHOD(
  39. void,
  40. AddTrustedRecoveryMethod,
  41. (const std::string&, const std::vector<uint8_t>&, int, base::OnceClosure),
  42. (override));
  43. MOCK_METHOD(void, ClearDataForAccount, (const CoreAccountInfo&), (override));
  44. };
  45. } // namespace syncer
  46. #endif // COMPONENTS_SYNC_DRIVER_MOCK_TRUSTED_VAULT_CLIENT_H_