1 // Copyright 2019 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.
5 #ifndef COMPONENTS_SYNC_DEVICE_INFO_FAKE_DEVICE_INFO_SYNC_SERVICE_H_
6 #define COMPONENTS_SYNC_DEVICE_INFO_FAKE_DEVICE_INFO_SYNC_SERVICE_H_
8 #include "base/callback.h"
9 #include "components/sync/test/model/fake_model_type_controller_delegate.h"
10 #include "components/sync_device_info/device_info_sync_service.h"
11 #include "components/sync_device_info/fake_device_info_tracker.h"
12 #include "components/sync_device_info/fake_local_device_info_provider.h"
16 class FakeDeviceInfoSyncService : public DeviceInfoSyncService {
18 FakeDeviceInfoSyncService();
19 ~FakeDeviceInfoSyncService() override;
21 // DeviceInfoSyncService implementation.
22 FakeLocalDeviceInfoProvider* GetLocalDeviceInfoProvider() override;
23 FakeDeviceInfoTracker* GetDeviceInfoTracker() override;
24 base::WeakPtr<ModelTypeControllerDelegate> GetControllerDelegate() override;
25 void RefreshLocalDeviceInfo(base::OnceClosure callback) override;
27 // Returns number of times RefreshLocalDeviceInfo() has been called.
28 int RefreshLocalDeviceInfoCount();
31 FakeDeviceInfoTracker fake_device_info_tracker_;
32 FakeLocalDeviceInfoProvider fake_local_device_info_provider_;
33 FakeModelTypeControllerDelegate fake_model_type_controller_delegate_;
35 int refresh_local_device_info_count_ = 0;
40 #endif // COMPONENTS_SYNC_DEVICE_INFO_FAKE_DEVICE_INFO_SYNC_SERVICE_H_