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

Side by Side Diff: chromeos/components/tether/mock_local_device_data_provider.h

Issue 2604063003: [CrOS Tether] Create BleScanner, a class which scan BLE advertisements and identifies nearby device… (Closed)
Patch Set: Add missing dependency. Created 3 years, 11 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
(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
OLDNEW
« no previous file with comments | « chromeos/components/tether/local_device_data_provider.h ('k') | chromeos/components/tether/mock_local_device_data_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698