| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_SYNC_DEVICE_INFO_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_ | 5 #ifndef COMPONENTS_SYNC_DEVICE_INFO_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_ |
| 6 #define COMPONENTS_SYNC_DEVICE_INFO_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_ | 6 #define COMPONENTS_SYNC_DEVICE_INFO_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "components/sync/device_info/device_info.h" | 11 #include "components/sync/device_info/device_info.h" |
| 12 #include "components/sync/device_info/local_device_info_provider.h" | 12 #include "components/sync/device_info/local_device_info_provider.h" |
| 13 | 13 |
| 14 namespace sync_driver { | 14 namespace syncer { |
| 15 | 15 |
| 16 class LocalDeviceInfoProviderMock | 16 class LocalDeviceInfoProviderMock : public LocalDeviceInfoProvider { |
| 17 : public sync_driver::LocalDeviceInfoProvider { | |
| 18 public: | 17 public: |
| 19 // Creates uninitialized provider. | 18 // Creates uninitialized provider. |
| 20 LocalDeviceInfoProviderMock(); | 19 LocalDeviceInfoProviderMock(); |
| 21 // Creates initialized provider with the specified device info. | 20 // Creates initialized provider with the specified device info. |
| 22 LocalDeviceInfoProviderMock(const std::string& guid, | 21 LocalDeviceInfoProviderMock(const std::string& guid, |
| 23 const std::string& client_name, | 22 const std::string& client_name, |
| 24 const std::string& chrome_version, | 23 const std::string& chrome_version, |
| 25 const std::string& sync_user_agent, | 24 const std::string& sync_user_agent, |
| 26 const sync_pb::SyncEnums::DeviceType device_type, | 25 const sync_pb::SyncEnums::DeviceType device_type, |
| 27 const std::string& signin_scoped_device_id); | 26 const std::string& signin_scoped_device_id); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 41 void Initialize(std::unique_ptr<DeviceInfo> local_device_info); | 40 void Initialize(std::unique_ptr<DeviceInfo> local_device_info); |
| 42 void SetInitialized(bool is_initialized); | 41 void SetInitialized(bool is_initialized); |
| 43 | 42 |
| 44 private: | 43 private: |
| 45 bool is_initialized_; | 44 bool is_initialized_; |
| 46 | 45 |
| 47 std::unique_ptr<DeviceInfo> local_device_info_; | 46 std::unique_ptr<DeviceInfo> local_device_info_; |
| 48 base::CallbackList<void(void)> callback_list_; | 47 base::CallbackList<void(void)> callback_list_; |
| 49 }; | 48 }; |
| 50 | 49 |
| 51 } // namespace sync_driver | 50 } // namespace syncer |
| 52 | 51 |
| 53 #endif // COMPONENTS_SYNC_DEVICE_INFO_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_ | 52 #endif // COMPONENTS_SYNC_DEVICE_INFO_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_ |
| OLD | NEW |