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

Side by Side Diff: chromeos/dbus/biod/fake_biod_client.h

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 unified diff | Download patch
OLDNEW
(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 #ifndef CHROMEOS_DBUS_BIOD_FAKE_BIOD_CLIENT_H_
6 #define CHROMEOS_DBUS_BIOD_FAKE_BIOD_CLIENT_H_
7
8 #include "base/macros.h"
9 #include "base/observer_list.h"
10 #include "chromeos/chromeos_export.h"
11 #include "chromeos/dbus/biod/biod_client.h"
12
13 namespace dbus {
14 class Bus;
15 class ObjectPath;
16 } // namespace dbus
17
18 namespace chromeos {
19
20 // A fake implementation of BiodClient.
21 class CHROMEOS_EXPORT FakeBiodClient : public BiodClient {
22 public:
23 FakeBiodClient();
24 ~FakeBiodClient() override;
25
26 // Notifies |observers_| about various events.
27 void NotifyEnrollScanDoneReceived(biod::ScanResult type_result,
28 bool is_complete);
29 void NotifyAuthScanDoneReceived(biod::ScanResult type_result,
30 const AuthScanMatches& matches);
31 void NotifySessionFailedReceived();
stevenjb 2017/04/04 17:07:31 Could you add a comment about where / how these ar
sammiequon 2017/04/04 18:31:01 I changed it a bit to better match how it is plann
32
33 // BiodClient:
34 void Init(dbus::Bus* bus) override;
35 void AddObserver(Observer* observer) override;
36 void RemoveObserver(Observer* observer) override;
37 bool HasObserver(const Observer* observer) const override;
38 void StartEnrollSession(const std::string& user_id,
39 const std::string& label,
40 const ObjectPathCallback& callback) override;
41 void GetRecordsForUser(const std::string& user_id,
42 const UserRecordsCallback& callback) override;
43 void DestroyAllRecords() override;
44 void StartAuthSession(const ObjectPathCallback& callback) override;
45 void RequestType(const BiometricTypeCallback& callback) override;
46 void CancelEnrollSession(
47 const dbus::ObjectPath& enroll_session_path) override;
48 void EndAuthSession(const dbus::ObjectPath& auth_session_path) override;
49 void SetRecordLabel(const dbus::ObjectPath& record_path,
50 const std::string& label) override;
51 void RemoveRecord(const dbus::ObjectPath& record_path) override;
52 void RequestRecordLabel(const dbus::ObjectPath& record_path,
53 const LabelCallback& callback) override;
54
55 private:
56 base::ObserverList<Observer> observers_;
57
58 DISALLOW_COPY_AND_ASSIGN(FakeBiodClient);
59 };
60
61 } // namespace chromeos
62
63 #endif // CHROMEOS_DBUS_BIOD_FAKE_BIOD_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698