Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6066)

Unified Diff: chromeos/dbus/biod/fake_biod_client.cc

Issue 2578323004: cros: Fake implementation of DBUS biometrics client. (Closed)
Patch Set: Fixed patch set 6 errors. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {}
stevenjb 2017/04/04 17:07:31 Typically the fake should invoke the callback asyn
sammiequon 2017/04/04 18:31:01 Done.
+
+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
« chromeos/dbus/biod/fake_biod_client.h ('K') | « chromeos/dbus/biod/fake_biod_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698