Chromium Code Reviews| Index: chromeos/dbus/biod/fake_biod_client.cc |
| diff --git a/chromeos/dbus/biod/fake_biod_client.cc b/chromeos/dbus/biod/fake_biod_client.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..47c84b76d5dd58eb3f89e2753d98de7ba9a064dc |
| --- /dev/null |
| +++ b/chromeos/dbus/biod/fake_biod_client.cc |
| @@ -0,0 +1,75 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chromeos/dbus/biod/fake_biod_client.h" |
| + |
| +#include "dbus/object_path.h" |
| +#include "third_party/cros_system_api/dbus/service_constants.h" |
| + |
| +namespace chromeos { |
| + |
| +FakeBiodClient::FakeBiodClient() {} |
| + |
| +FakeBiodClient::~FakeBiodClient() {} |
| + |
| +void FakeBiodClient::Init(dbus::Bus* bus) {} |
| + |
| +void FakeBiodClient::AddObserver(Observer* observer) { |
| + observers_.AddObserver(observer); |
| +} |
| + |
| +void FakeBiodClient::RemoveObserver(Observer* observer) { |
| + observers_.RemoveObserver(observer); |
| +} |
| + |
| +bool FakeBiodClient::HasObserver(const Observer* observer) const { |
| + return observers_.HasObserver(observer); |
| +} |
| + |
| +void FakeBiodClient::StartEnrollSession(const std::string& user_id, |
| + const std::string& label, |
| + 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
|
| + |
| +void FakeBiodClient::GetRecordsForUser(const std::string& user_id, |
| + const UserRecordsCallback& callback) {} |
| + |
| +void FakeBiodClient::DestroyAllRecords() {} |
| + |
| +void FakeBiodClient::StartAuthSession(const ObjectPathCallback& callback) {} |
| + |
| +void FakeBiodClient::RequestType(const BiometricTypeCallback& callback) {} |
| + |
| +void FakeBiodClient::CancelEnrollSession( |
| + const dbus::ObjectPath& enroll_session_path) {} |
| + |
| +void FakeBiodClient::EndAuthSession(const dbus::ObjectPath& auth_session_path) { |
| +} |
| + |
| +void FakeBiodClient::SetRecordLabel(const dbus::ObjectPath& record_path, |
| + const std::string& label) {} |
| + |
| +void FakeBiodClient::RemoveRecord(const dbus::ObjectPath& record_path) {} |
| + |
| +void FakeBiodClient::RequestRecordLabel(const dbus::ObjectPath& record_path, |
| + const LabelCallback& callback) {} |
| + |
| +void FakeBiodClient::NotifyEnrollScanDoneReceived(biod::ScanResult type_result, |
| + bool is_complete) { |
| + for (auto& observer : observers_) |
| + observer.BiodEnrollScanDoneReceived(type_result, is_complete); |
| +} |
| + |
| +void FakeBiodClient::NotifyAuthScanDoneReceived( |
| + biod::ScanResult type_result, |
| + const AuthScanMatches& matches) { |
| + for (auto& observer : observers_) |
| + observer.BiodAuthScanDoneReceived(type_result, matches); |
| +} |
| + |
| +void FakeBiodClient::NotifySessionFailedReceived() { |
| + for (auto& observer : observers_) |
| + observer.BiodSessionFailedReceived(); |
| +} |
| + |
| +} // namespace chromeos |