Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: components/sync_driver/local_device_info_provider_mock.h

Issue 666133002: Standardize usage of virtual/override/final in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_
6 #define COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_ 6 #define COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_
7 7
8 #include "components/sync_driver/device_info.h" 8 #include "components/sync_driver/device_info.h"
9 #include "components/sync_driver/local_device_info_provider.h" 9 #include "components/sync_driver/local_device_info_provider.h"
10 10
11 namespace sync_driver { 11 namespace sync_driver {
12 12
13 class LocalDeviceInfoProviderMock 13 class LocalDeviceInfoProviderMock
14 : public sync_driver::LocalDeviceInfoProvider { 14 : public sync_driver::LocalDeviceInfoProvider {
15 public: 15 public:
16 // Creates uninitialized provider. 16 // Creates uninitialized provider.
17 LocalDeviceInfoProviderMock(); 17 LocalDeviceInfoProviderMock();
18 // Creates initialized provider with the specified device info. 18 // Creates initialized provider with the specified device info.
19 LocalDeviceInfoProviderMock( 19 LocalDeviceInfoProviderMock(
20 const std::string& guid, 20 const std::string& guid,
21 const std::string& client_name, 21 const std::string& client_name,
22 const std::string& chrome_version, 22 const std::string& chrome_version,
23 const std::string& sync_user_agent, 23 const std::string& sync_user_agent,
24 const sync_pb::SyncEnums::DeviceType device_type, 24 const sync_pb::SyncEnums::DeviceType device_type,
25 const std::string& signin_scoped_device_id); 25 const std::string& signin_scoped_device_id);
26 virtual ~LocalDeviceInfoProviderMock(); 26 ~LocalDeviceInfoProviderMock() override;
27 27
28 virtual const DeviceInfo* GetLocalDeviceInfo() const override; 28 const DeviceInfo* GetLocalDeviceInfo() const override;
29 virtual std::string GetLocalSyncCacheGUID() const override; 29 std::string GetLocalSyncCacheGUID() const override;
30 virtual void Initialize( 30 void Initialize(const std::string& cache_guid,
31 const std::string& cache_guid, 31 const std::string& signin_scoped_device_id) override;
32 const std::string& signin_scoped_device_id) override; 32 scoped_ptr<Subscription> RegisterOnInitializedCallback(
33 virtual scoped_ptr<Subscription> RegisterOnInitializedCallback( 33 const base::Closure& callback) override;
34 const base::Closure& callback) override;
35 34
36 void SetInitialized(bool is_initialized); 35 void SetInitialized(bool is_initialized);
37 36
38 private: 37 private:
39 bool is_initialized_; 38 bool is_initialized_;
40 39
41 scoped_ptr<DeviceInfo> local_device_info_; 40 scoped_ptr<DeviceInfo> local_device_info_;
42 base::CallbackList<void(void)> callback_list_; 41 base::CallbackList<void(void)> callback_list_;
43 }; 42 };
44 43
45 } // namespace sync_driver 44 } // namespace sync_driver
46 45
47 #endif // COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_ 46 #endif // COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_MOCK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698