| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 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 CHROMEOS_COMPONENTS_TETHER_MOCK_LOCAL_DEVICE_DATA_PROVIDER_H_ | |
| 6 #define CHROMEOS_COMPONENTS_TETHER_MOCK_LOCAL_DEVICE_DATA_PROVIDER_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 #include <string> | |
| 10 #include <vector> | |
| 11 | |
| 12 #include "base/macros.h" | |
| 13 #include "base/memory/ptr_util.h" | |
| 14 #include "chromeos/components/tether/local_device_data_provider.h" | |
| 15 | |
| 16 namespace cryptauth { | |
| 17 class BeaconSeed; | |
| 18 } | |
| 19 | |
| 20 namespace chromeos { | |
| 21 | |
| 22 namespace tether { | |
| 23 | |
| 24 // Test double for LocalDeviceDataProvider. | |
| 25 class MockLocalDeviceDataProvider : public LocalDeviceDataProvider { | |
| 26 public: | |
| 27 MockLocalDeviceDataProvider(); | |
| 28 ~MockLocalDeviceDataProvider() override; | |
| 29 | |
| 30 void SetPublicKey(std::unique_ptr<std::string> public_key); | |
| 31 void SetBeaconSeeds( | |
| 32 std::unique_ptr<std::vector<cryptauth::BeaconSeed>> beacon_seeds); | |
| 33 | |
| 34 // LocalDeviceDataProvider: | |
| 35 bool GetLocalDeviceData( | |
| 36 std::string* public_key_out, | |
| 37 std::vector<cryptauth::BeaconSeed>* beacon_seeds_out) const override; | |
| 38 | |
| 39 private: | |
| 40 std::unique_ptr<std::string> public_key_; | |
| 41 std::unique_ptr<std::vector<cryptauth::BeaconSeed>> beacon_seeds_; | |
| 42 | |
| 43 DISALLOW_COPY_AND_ASSIGN(MockLocalDeviceDataProvider); | |
| 44 }; | |
| 45 | |
| 46 } // namespace tether | |
| 47 | |
| 48 } // namespace chromeos | |
| 49 | |
| 50 #endif // CHROMEOS_COMPONENTS_TETHER_MOCK_LOCAL_DEVICE_DATA_PROVIDER_H_ | |
| OLD | NEW |