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

Side by Side Diff: chromeos/components/tether/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
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_LOCAL_DEVICE_DATA_PROVIDER_H 5 #ifndef CHROMEOS_COMPONENTS_TETHER_LOCAL_DEVICE_DATA_PROVIDER_H
6 #define CHROMEOS_COMPONENTS_TETHER_LOCAL_DEVICE_DATA_PROVIDER_H 6 #define CHROMEOS_COMPONENTS_TETHER_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>
(...skipping 18 matching lines...) Expand all
29 public: 29 public:
30 LocalDeviceDataProvider( 30 LocalDeviceDataProvider(
31 const cryptauth::CryptAuthDeviceManager* cryptauth_device_manager, 31 const cryptauth::CryptAuthDeviceManager* cryptauth_device_manager,
32 const cryptauth::CryptAuthEnrollmentManager* 32 const cryptauth::CryptAuthEnrollmentManager*
33 cryptauth_enrollment_manager); 33 cryptauth_enrollment_manager);
34 virtual ~LocalDeviceDataProvider(); 34 virtual ~LocalDeviceDataProvider();
35 35
36 // Fetches the public key and/or the beacon seeds for the local device. 36 // Fetches the public key and/or the beacon seeds for the local device.
37 // Returns whether the operation succeeded. If |nullptr| is passed as a 37 // Returns whether the operation succeeded. If |nullptr| is passed as a
38 // parameter, the associated data will not be fetched. 38 // parameter, the associated data will not be fetched.
39 bool GetLocalDeviceData( 39 virtual bool GetLocalDeviceData(
40 std::string* public_key_out, 40 std::string* public_key_out,
41 std::vector<cryptauth::BeaconSeed>* beacon_seeds_out) const; 41 std::vector<cryptauth::BeaconSeed>* beacon_seeds_out) const;
42 42
43 private: 43 private:
44 friend class LocalDeviceDataProviderTest; 44 friend class LocalDeviceDataProviderTest;
45 45
46 class LocalDeviceDataProviderDelegate { 46 class LocalDeviceDataProviderDelegate {
47 public: 47 public:
48 virtual ~LocalDeviceDataProviderDelegate() {} 48 virtual ~LocalDeviceDataProviderDelegate() {}
49 virtual std::string GetUserPublicKey() const = 0; 49 virtual std::string GetUserPublicKey() const = 0;
(...skipping 29 matching lines...) Expand all
79 std::unique_ptr<LocalDeviceDataProviderDelegate> delegate_; 79 std::unique_ptr<LocalDeviceDataProviderDelegate> delegate_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(LocalDeviceDataProvider); 81 DISALLOW_COPY_AND_ASSIGN(LocalDeviceDataProvider);
82 }; 82 };
83 83
84 } // namespace tether 84 } // namespace tether
85 85
86 } // namespace chromeos 86 } // namespace chromeos
87 87
88 #endif // CHROMEOS_COMPONENTS_TETHER_LOCAL_DEVICE_DATA_PROVIDER_H 88 #endif // CHROMEOS_COMPONENTS_TETHER_LOCAL_DEVICE_DATA_PROVIDER_H
OLDNEW
« no previous file with comments | « chromeos/components/tether/ble_scanner_unittest.cc ('k') | chromeos/components/tether/mock_local_device_data_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698