| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "chromeos/components/tether/mock_local_device_data_provider.h" | 5 #include "chromeos/components/tether/mock_local_device_data_provider.h" |
| 6 | 6 |
| 7 #include "components/cryptauth/cryptauth_device_manager.h" | 7 #include "components/cryptauth/cryptauth_device_manager.h" |
| 8 #include "components/cryptauth/cryptauth_enrollment_manager.h" | 8 #include "components/cryptauth/cryptauth_enrollment_manager.h" |
| 9 #include "components/cryptauth/proto/cryptauth_api.pb.h" | 9 #include "components/cryptauth/proto/cryptauth_api.pb.h" |
| 10 | 10 |
| 11 namespace chromeos { | 11 namespace chromeos { |
| 12 | 12 |
| 13 namespace tether { | 13 namespace tether { |
| 14 | 14 |
| 15 MockLocalDeviceDataProvider::MockLocalDeviceDataProvider() | 15 MockLocalDeviceDataProvider::MockLocalDeviceDataProvider() |
| 16 : LocalDeviceDataProvider(nullptr, nullptr) {} | 16 : LocalDeviceDataProvider(nullptr /* cryptauth_service */) {} |
| 17 | 17 |
| 18 MockLocalDeviceDataProvider::~MockLocalDeviceDataProvider() {} | 18 MockLocalDeviceDataProvider::~MockLocalDeviceDataProvider() {} |
| 19 | 19 |
| 20 void MockLocalDeviceDataProvider::SetPublicKey( | 20 void MockLocalDeviceDataProvider::SetPublicKey( |
| 21 std::unique_ptr<std::string> public_key) { | 21 std::unique_ptr<std::string> public_key) { |
| 22 if (public_key) { | 22 if (public_key) { |
| 23 public_key_ = std::move(public_key); | 23 public_key_ = std::move(public_key); |
| 24 } else { | 24 } else { |
| 25 public_key_.reset(); | 25 public_key_.reset(); |
| 26 } | 26 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 48 if (beacon_seeds_ && beacon_seeds_out) { | 48 if (beacon_seeds_ && beacon_seeds_out) { |
| 49 *beacon_seeds_out = *beacon_seeds_; | 49 *beacon_seeds_out = *beacon_seeds_; |
| 50 success = true; | 50 success = true; |
| 51 } | 51 } |
| 52 | 52 |
| 53 return success; | 53 return success; |
| 54 } | 54 } |
| 55 | 55 |
| 56 } // namespace tether | 56 } // namespace tether |
| 57 | 57 |
| 58 } // namespace cryptauth | 58 } // namespace chromeos |
| OLD | NEW |