fake_host_device_timestamp_manager.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright 2018 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 ASH_SERVICES_MULTIDEVICE_SETUP_FAKE_HOST_DEVICE_TIMESTAMP_MANAGER_H_
  5. #define ASH_SERVICES_MULTIDEVICE_SETUP_FAKE_HOST_DEVICE_TIMESTAMP_MANAGER_H_
  6. #include "ash/services/multidevice_setup/host_device_timestamp_manager.h"
  7. #include "base/time/time.h"
  8. #include "third_party/abseil-cpp/absl/types/optional.h"
  9. namespace ash {
  10. namespace multidevice_setup {
  11. class FakeHostDeviceTimestampManager : public HostDeviceTimestampManager {
  12. public:
  13. FakeHostDeviceTimestampManager();
  14. ~FakeHostDeviceTimestampManager() override;
  15. void set_was_host_set_from_this_chromebook(
  16. bool was_host_set_from_this_chromebook);
  17. void set_completion_timestamp(const base::Time& timestamp);
  18. void set_verification_timestamp(const base::Time& timestamp);
  19. private:
  20. // HostDeviceTimestampManager:
  21. bool WasHostSetFromThisChromebook() override;
  22. absl::optional<base::Time> GetLatestSetupFlowCompletionTimestamp() override;
  23. absl::optional<base::Time> GetLatestVerificationTimestamp() override;
  24. bool was_host_set_from_this_chromebook_;
  25. absl::optional<base::Time> completion_time_;
  26. absl::optional<base::Time> verification_time_;
  27. };
  28. } // namespace multidevice_setup
  29. } // namespace ash
  30. #endif // ASH_SERVICES_MULTIDEVICE_SETUP_FAKE_HOST_DEVICE_TIMESTAMP_MANAGER_H_