| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_ | |
| 6 #define CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_ | |
| 7 | |
| 8 #include "chrome/browser/sync/glue/device_info.h" | |
| 9 #include "chrome/browser/sync/glue/local_device_info_provider.h" | |
| 10 | |
| 11 namespace browser_sync { | |
| 12 | |
| 13 class LocalDeviceInfoProviderMock : public LocalDeviceInfoProvider { | |
| 14 public: | |
| 15 // Creates uninitialized provider. | |
| 16 LocalDeviceInfoProviderMock(); | |
| 17 // Creates initialized provider with the specified device info. | |
| 18 LocalDeviceInfoProviderMock( | |
| 19 const std::string& guid, | |
| 20 const std::string& client_name, | |
| 21 const std::string& chrome_version, | |
| 22 const std::string& sync_user_agent, | |
| 23 const sync_pb::SyncEnums::DeviceType device_type); | |
| 24 virtual ~LocalDeviceInfoProviderMock(); | |
| 25 | |
| 26 virtual const DeviceInfo* GetLocalDeviceInfo() const OVERRIDE; | |
| 27 virtual std::string GetLocalSyncCacheGUID() const OVERRIDE; | |
| 28 virtual void Initialize(const std::string& cache_guid) OVERRIDE; | |
| 29 virtual scoped_ptr<Subscription> RegisterOnInitializedCallback( | |
| 30 const base::Closure& callback) OVERRIDE; | |
| 31 | |
| 32 void SetInitialized(bool is_initialized); | |
| 33 | |
| 34 private: | |
| 35 bool is_initialized_; | |
| 36 | |
| 37 scoped_ptr<DeviceInfo> local_device_info_; | |
| 38 base::CallbackList<void(void)> callback_list_; | |
| 39 }; | |
| 40 | |
| 41 } // namespace browser_sync | |
| 42 | |
| 43 #endif // CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_ | |
| OLD | NEW |