Chromium Code Reviews| 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) {} | |
|
Daniel Erat
2017/04/04 05:53:34
in the future, you may need to post all of these c
sammiequon
2017/04/04 16:07:22
Yeah, these are done in part 5 (though a bit of mo
| |
| 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::NotifyEnrollScanDoneReceived(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::NotifyAuthScanDoneReceived( | |
| 64 biod::ScanResult type_result, | |
| 65 const AuthScanMatches& matches) { | |
| 66 for (auto& observer : observers_) | |
| 67 observer.BiodAuthScanDoneReceived(type_result, matches); | |
| 68 } | |
| 69 | |
| 70 void FakeBiodClient::NotifySessionFailedReceived() { | |
| 71 for (auto& observer : observers_) | |
| 72 observer.BiodSessionFailedReceived(); | |
| 73 } | |
| 74 | |
| 75 } // namespace chromeos | |
| OLD | NEW |