| 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..cb5c507a1337ecf238c93b4ff8448f1c3034ba9f
|
| --- /dev/null
|
| +++ b/chromeos/dbus/biod/fake_biod_client.cc
|
| @@ -0,0 +1,74 @@
|
| +// 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) {}
|
| +
|
| +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::OnEnrollScanDoneReceived(biod::ScanResult type_result,
|
| + bool is_complete) {
|
| + for (auto& observer : observers_)
|
| + observer.BiodEnrollScanDoneReceived(type_result, is_complete);
|
| +}
|
| +
|
| +void FakeBiodClient::OnAuthScanDoneReceived(biod::ScanResult type_result,
|
| + const AuthScanMatches& matches) {
|
| + for (auto& observer : observers_)
|
| + observer.BiodAuthScanDoneReceived(type_result, matches);
|
| +}
|
| +
|
| +void FakeBiodClient::OnSessionFailedReceived() {
|
| + for (auto& observer : observers_)
|
| + observer.BiodSessionFailedReceived();
|
| +}
|
| +
|
| +} // namespace chromeos
|
|
|