Index: device/u2f/u2f_register.h |
diff --git a/device/u2f/u2f_register.h b/device/u2f/u2f_register.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8f6a3cfc364c04f438c4e54be1336f460c122033 |
--- /dev/null |
+++ b/device/u2f/u2f_register.h |
@@ -0,0 +1,37 @@ |
+// 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. |
+ |
+#ifndef DEVICE_U2F_U2F_REGISTER_H_ |
+#define DEVICE_U2F_U2F_REGISTER_H_ |
+ |
+#include <vector> |
+ |
+#include "u2f_request.h" |
+ |
+namespace device { |
+ |
+class U2fRegister : public U2fRequest { |
+ public: |
+ U2fRegister(std::vector<uint8_t> challenge_hash, |
+ std::vector<uint8_t> app_param, |
Reilly Grant (use Gerrit)
2017/04/21 17:19:16
std::vector is usually passed as a const&. The rea
Casey Piper
2017/04/21 22:55:15
Done.
|
+ const ResponseCallback& cb); |
+ ~U2fRegister() override; |
+ |
+ static std::unique_ptr<U2fRequest> TryRegistration( |
+ std::vector<uint8_t> challenge_hash, |
+ std::vector<uint8_t> app_param, |
+ const ResponseCallback& cb); |
+ |
+ private: |
+ void TryDevice() override; |
+ void OnTryDevice(U2fDevice::ReturnCode, std::vector<uint8_t>); |
+ |
+ std::vector<uint8_t> challenge_hash_; |
+ std::vector<uint8_t> app_param_; |
+ base::WeakPtrFactory<U2fRegister> weak_factory_; |
+}; |
+ |
+} // namespace device |
+ |
+#endif // DEVICE_U2F_U2F_REGISTER_H_ |