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

Unified Diff: device/u2f/u2f_hid_device.h

Issue 2824803003: Add timeout task to U2F HID state machine (Closed)
Patch Set: Fix nits 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
« no previous file with comments | « device/u2f/u2f_device.h ('k') | device/u2f/u2f_hid_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/u2f/u2f_hid_device.h
diff --git a/device/u2f/u2f_hid_device.h b/device/u2f/u2f_hid_device.h
index 527c0b30177d73554b328c108745ee2abbe4c3ad..84694f4ba295e10fe010191d2b4bbda4d8f7fcd6 100644
--- a/device/u2f/u2f_hid_device.h
+++ b/device/u2f/u2f_hid_device.h
@@ -7,6 +7,7 @@
#include <list>
+#include "base/cancelable_callback.h"
#include "device/hid/hid_service.h"
#include "u2f_device.h"
@@ -23,7 +24,7 @@ class HidDeviceInfo;
class U2fHidDevice : public U2fDevice {
public:
U2fHidDevice(scoped_refptr<HidDeviceInfo>);
- ~U2fHidDevice();
+ ~U2fHidDevice() final;
// Send a U2f command to this device
void DeviceTransact(std::unique_ptr<U2fApduCommand> command,
@@ -85,8 +86,13 @@ class U2fHidDevice : public U2fDevice {
void OnWink(const WinkCallback& callback,
bool success,
std::unique_ptr<U2fMessage> response);
+ void ArmTimeout(const DeviceCallback& callback);
+ void OnTimeout(const DeviceCallback& callback);
+ void OnDeviceTransact(bool success,
+ std::unique_ptr<U2fApduResponse> response);
State state_;
+ base::CancelableClosure timeout_callback_;
std::list<std::pair<std::unique_ptr<U2fApduCommand>, DeviceCallback>>
pending_transactions_;
scoped_refptr<HidDeviceInfo> device_info_;
« no previous file with comments | « device/u2f/u2f_device.h ('k') | device/u2f/u2f_hid_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698