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

Side by Side Diff: components/cryptauth/mock_local_device_data_provider.h

Issue 2951303002: [CrOS Tether] Move LocalDeviceDataProvider from //chromeos/components/tether to //components/crypta… (Closed)
Patch Set: Rebased. Created 3 years, 6 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 2016 The Chromium Authors. All rights reserved. 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 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 CHROMEOS_COMPONENTS_TETHER_MOCK_LOCAL_DEVICE_DATA_PROVIDER_H_ 5 #ifndef COMPONENTS_CRYPTAUTH_MOCK_LOCAL_DEVICE_DATA_PROVIDER_H_
6 #define CHROMEOS_COMPONENTS_TETHER_MOCK_LOCAL_DEVICE_DATA_PROVIDER_H_ 6 #define COMPONENTS_CRYPTAUTH_MOCK_LOCAL_DEVICE_DATA_PROVIDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "chromeos/components/tether/local_device_data_provider.h" 14 #include "components/cryptauth/local_device_data_provider.h"
15 15
16 namespace cryptauth { 16 namespace cryptauth {
17
17 class BeaconSeed; 18 class BeaconSeed;
18 }
19
20 namespace chromeos {
21
22 namespace tether {
23 19
24 // Test double for LocalDeviceDataProvider. 20 // Test double for LocalDeviceDataProvider.
25 class MockLocalDeviceDataProvider : public LocalDeviceDataProvider { 21 class MockLocalDeviceDataProvider : public LocalDeviceDataProvider {
26 public: 22 public:
27 MockLocalDeviceDataProvider(); 23 MockLocalDeviceDataProvider();
28 ~MockLocalDeviceDataProvider() override; 24 ~MockLocalDeviceDataProvider() override;
29 25
30 void SetPublicKey(std::unique_ptr<std::string> public_key); 26 void SetPublicKey(std::unique_ptr<std::string> public_key);
31 void SetBeaconSeeds( 27 void SetBeaconSeeds(std::unique_ptr<std::vector<BeaconSeed>> beacon_seeds);
32 std::unique_ptr<std::vector<cryptauth::BeaconSeed>> beacon_seeds);
33 28
34 // LocalDeviceDataProvider: 29 // LocalDeviceDataProvider:
35 bool GetLocalDeviceData( 30 bool GetLocalDeviceData(
36 std::string* public_key_out, 31 std::string* public_key_out,
37 std::vector<cryptauth::BeaconSeed>* beacon_seeds_out) const override; 32 std::vector<BeaconSeed>* beacon_seeds_out) const override;
38 33
39 private: 34 private:
40 std::unique_ptr<std::string> public_key_; 35 std::unique_ptr<std::string> public_key_;
41 std::unique_ptr<std::vector<cryptauth::BeaconSeed>> beacon_seeds_; 36 std::unique_ptr<std::vector<BeaconSeed>> beacon_seeds_;
42 37
43 DISALLOW_COPY_AND_ASSIGN(MockLocalDeviceDataProvider); 38 DISALLOW_COPY_AND_ASSIGN(MockLocalDeviceDataProvider);
44 }; 39 };
45 40
46 } // namespace tether 41 } // namespace cryptauth
47 42
48 } // namespace chromeos 43 #endif // COMPONENTS_CRYPTAUTH_MOCK_LOCAL_DEVICE_DATA_PROVIDER_H_
49
50 #endif // CHROMEOS_COMPONENTS_TETHER_MOCK_LOCAL_DEVICE_DATA_PROVIDER_H_
OLDNEW
« no previous file with comments | « components/cryptauth/local_device_data_provider_unittest.cc ('k') | components/cryptauth/mock_local_device_data_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698