fake_host_device_timestamp_manager.cc 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #include "ash/services/multidevice_setup/fake_host_device_timestamp_manager.h"
  5. namespace ash {
  6. namespace multidevice_setup {
  7. FakeHostDeviceTimestampManager::FakeHostDeviceTimestampManager() {
  8. was_host_set_from_this_chromebook_ = false;
  9. }
  10. FakeHostDeviceTimestampManager::~FakeHostDeviceTimestampManager() = default;
  11. void FakeHostDeviceTimestampManager::set_was_host_set_from_this_chromebook(
  12. bool was_host_set_from_this_chromebook) {
  13. was_host_set_from_this_chromebook_ = was_host_set_from_this_chromebook;
  14. }
  15. void FakeHostDeviceTimestampManager::set_completion_timestamp(
  16. const base::Time& timestamp) {
  17. completion_time_ = timestamp;
  18. }
  19. void FakeHostDeviceTimestampManager::set_verification_timestamp(
  20. const base::Time& timestamp) {
  21. verification_time_ = timestamp;
  22. }
  23. bool FakeHostDeviceTimestampManager::WasHostSetFromThisChromebook() {
  24. return was_host_set_from_this_chromebook_;
  25. }
  26. absl::optional<base::Time>
  27. FakeHostDeviceTimestampManager::GetLatestSetupFlowCompletionTimestamp() {
  28. return completion_time_;
  29. }
  30. absl::optional<base::Time>
  31. FakeHostDeviceTimestampManager::GetLatestVerificationTimestamp() {
  32. return verification_time_;
  33. }
  34. } // namespace multidevice_setup
  35. } // namespace ash