| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |