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 5 #include "chromeos/services/multidevice_setup/fake_host_device_timestamp_manager.h" 6 7 namespace chromeos { 8 9 namespace multidevice_setup { 10 FakeHostDeviceTimestampManager()11FakeHostDeviceTimestampManager::FakeHostDeviceTimestampManager() { 12 was_host_set_from_this_chromebook_ = false; 13 } 14 15 FakeHostDeviceTimestampManager::~FakeHostDeviceTimestampManager() = default; 16 set_was_host_set_from_this_chromebook(bool was_host_set_from_this_chromebook)17void FakeHostDeviceTimestampManager::set_was_host_set_from_this_chromebook( 18 bool was_host_set_from_this_chromebook) { 19 was_host_set_from_this_chromebook_ = was_host_set_from_this_chromebook; 20 } 21 set_completion_timestamp(const base::Time & timestamp)22void FakeHostDeviceTimestampManager::set_completion_timestamp( 23 const base::Time& timestamp) { 24 completion_time_ = timestamp; 25 } 26 set_verification_timestamp(const base::Time & timestamp)27void FakeHostDeviceTimestampManager::set_verification_timestamp( 28 const base::Time& timestamp) { 29 verification_time_ = timestamp; 30 } 31 WasHostSetFromThisChromebook()32bool FakeHostDeviceTimestampManager::WasHostSetFromThisChromebook() { 33 return was_host_set_from_this_chromebook_; 34 } 35 36 base::Optional<base::Time> GetLatestSetupFlowCompletionTimestamp()37FakeHostDeviceTimestampManager::GetLatestSetupFlowCompletionTimestamp() { 38 return completion_time_; 39 } 40 41 base::Optional<base::Time> GetLatestVerificationTimestamp()42FakeHostDeviceTimestampManager::GetLatestVerificationTimestamp() { 43 return verification_time_; 44 } 45 46 } // namespace multidevice_setup 47 48 } // namespace chromeos 49