Chromium Code Reviews| Index: chrome/browser/sync/glue/local_device_info_provider_mock.h |
| diff --git a/chrome/browser/sync/glue/local_device_info_provider_mock.h b/chrome/browser/sync/glue/local_device_info_provider_mock.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..907303e3debabedf78869cd4d1eb324252df3480 |
| --- /dev/null |
| +++ b/chrome/browser/sync/glue/local_device_info_provider_mock.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_ |
| +#define CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_ |
| + |
| +#include "chrome/browser/sync/glue/device_info.h" |
| +#include "chrome/browser/sync/glue/local_device_info_provider.h" |
| + |
| +namespace browser_sync { |
| + |
| +class LocalDeviceInfoProviderMock : public LocalDeviceInfoProvider { |
|
maniscalco
2014/07/08 21:17:53
Most of the sync code I've seen prefixes mocks wit
stanisc
2014/07/09 21:58:36
There are 26 instances (including this one) of fil
maniscalco
2014/07/09 22:47:34
You're right, it's mixed. All of the files in c/b
|
| + public: |
| + LocalDeviceInfoProviderMock( |
| + const std::string& guid, |
| + const std::string& client_name, |
| + const std::string& chrome_version, |
| + const std::string& sync_user_agent, |
| + const sync_pb::SyncEnums::DeviceType device_type); |
| + virtual ~LocalDeviceInfoProviderMock(); |
| + |
| + virtual const DeviceInfo* GetLocalDeviceInfo() const OVERRIDE; |
| + virtual std::string GetLocalSyncCacheGUID() const OVERRIDE; |
| + virtual bool IsInitialized() const OVERRIDE; |
| + virtual scoped_ptr<Subscription> RegisterOnInitializedCallback( |
| + const base::Closure& callback) OVERRIDE; |
| + |
| + void SetInitialized(bool is_initialized); |
| + |
| + private: |
| + bool is_initialized_; |
| + |
| + scoped_ptr<DeviceInfo> local_device_info_; |
| + base::CallbackList<void(void)> callback_list_; |
| +}; |
| + |
| +} // namespace browser_sync |
| + |
| +#endif // CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_ |