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

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

Issue 2578323004: cros: Fake implementation of DBUS biometrics client. (Closed)
Patch Set: Rebased. 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
« no previous file with comments | « chromeos/dbus/biod/biod_client.cc ('k') | chromeos/dbus/biod/fake_biod_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ObjectPath;
Daniel Erat 2017/04/04 02:10:57 nit: also forward-declare Bus
sammiequon 2017/04/04 04:15:51 Done.
15 } // namespace dbus
16
17 namespace chromeos {
18
19 // A fake implementation of BiodClient.
20 class CHROMEOS_EXPORT FakeBiodClient : public BiodClient {
21 public:
22 FakeBiodClient();
23 ~FakeBiodClient() override;
24
25 // BiodClient:
26 void Init(dbus::Bus* bus) override;
27 void AddObserver(Observer* observer) override;
28 void RemoveObserver(Observer* observer) override;
29 bool HasObserver(const Observer* observer) const override;
30 void StartEnrollSession(const std::string& user_id,
31 const std::string& label,
32 const ObjectPathCallback& callback) override;
33 void GetRecordsForUser(const std::string& user_id,
34 const UserRecordsCallback& callback) override;
35 void DestroyAllRecords() override;
36 void StartAuthSession(const ObjectPathCallback& callback) override;
37 void RequestType(const BiometricTypeCallback& callback) override;
38 void CancelEnrollSession(
39 const dbus::ObjectPath& enroll_session_path) override;
40 void EndAuthSession(const dbus::ObjectPath& auth_session_path) override;
41 void SetRecordLabel(const dbus::ObjectPath& record_path,
42 const std::string& label) override;
43 void RemoveRecord(const dbus::ObjectPath& record_path) override;
44 void RequestRecordLabel(const dbus::ObjectPath& record_path,
45 const LabelCallback& callback) override;
46
47 private:
48 void OnEnrollScanDoneReceived(biod::ScanResult type_result, bool is_complete);
Daniel Erat 2017/04/04 02:10:57 what are these for? they're private and don't look
sammiequon 2017/04/04 04:15:51 These are supposed to be callbacks for a fake impl
49 void OnAuthScanDoneReceived(biod::ScanResult type_result,
50 const AuthScanMatches& matches);
51 void OnSessionFailedReceived();
52
53 base::ObserverList<Observer> observers_;
54
55 DISALLOW_COPY_AND_ASSIGN(FakeBiodClient);
56 };
57
58 } // namespace chromeos
59
60 #endif // CHROMEOS_DBUS_BIOD_FAKE_BIOD_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/biod/biod_client.cc ('k') | chromeos/dbus/biod/fake_biod_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698