OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 #include "chromeos/dbus/biod/fake_biod_client.h" |
| 6 |
| 7 #include "dbus/object_path.h" |
| 8 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 9 |
| 10 namespace chromeos { |
| 11 |
| 12 FakeBiodClient::FakeBiodClient() {} |
| 13 |
| 14 FakeBiodClient::~FakeBiodClient() {} |
| 15 |
| 16 void FakeBiodClient::Init(dbus::Bus* bus) {} |
| 17 |
| 18 void FakeBiodClient::AddObserver(Observer* observer) { |
| 19 observers_.AddObserver(observer); |
| 20 } |
| 21 |
| 22 void FakeBiodClient::RemoveObserver(Observer* observer) { |
| 23 observers_.RemoveObserver(observer); |
| 24 } |
| 25 |
| 26 bool FakeBiodClient::HasObserver(const Observer* observer) const { |
| 27 return observers_.HasObserver(observer); |
| 28 } |
| 29 |
| 30 void FakeBiodClient::StartEnrollSession(const std::string& user_id, |
| 31 const std::string& label, |
| 32 const ObjectPathCallback& callback) {} |
| 33 |
| 34 void FakeBiodClient::GetRecordsForUser(const std::string& user_id, |
| 35 const UserRecordsCallback& callback) {} |
| 36 |
| 37 void FakeBiodClient::DestroyAllRecords() {} |
| 38 |
| 39 void FakeBiodClient::StartAuthSession(const ObjectPathCallback& callback) {} |
| 40 |
| 41 void FakeBiodClient::RequestType(const BiometricTypeCallback& callback) {} |
| 42 |
| 43 void FakeBiodClient::CancelEnrollSession( |
| 44 const dbus::ObjectPath& enroll_session_path) {} |
| 45 |
| 46 void FakeBiodClient::EndAuthSession(const dbus::ObjectPath& auth_session_path) { |
| 47 } |
| 48 |
| 49 void FakeBiodClient::SetRecordLabel(const dbus::ObjectPath& record_path, |
| 50 const std::string& label) {} |
| 51 |
| 52 void FakeBiodClient::RemoveRecord(const dbus::ObjectPath& record_path) {} |
| 53 |
| 54 void FakeBiodClient::RequestRecordLabel(const dbus::ObjectPath& record_path, |
| 55 const LabelCallback& callback) {} |
| 56 |
| 57 void FakeBiodClient::OnEnrollScanDoneReceived(biod::ScanResult type_result, |
| 58 bool is_complete) { |
| 59 for (auto& observer : observers_) |
| 60 observer.BiodEnrollScanDoneReceived(type_result, is_complete); |
| 61 } |
| 62 |
| 63 void FakeBiodClient::OnAuthScanDoneReceived(biod::ScanResult type_result, |
| 64 const AuthScanMatches& matches) { |
| 65 for (auto& observer : observers_) |
| 66 observer.BiodAuthScanDoneReceived(type_result, matches); |
| 67 } |
| 68 |
| 69 void FakeBiodClient::OnSessionFailedReceived() { |
| 70 for (auto& observer : observers_) |
| 71 observer.BiodSessionFailedReceived(); |
| 72 } |
| 73 |
| 74 } // namespace chromeos |
OLD | NEW |