| Index: device/u2f/u2f_device.cc
|
| diff --git a/device/u2f/u2f_device.cc b/device/u2f/u2f_device.cc
|
| index f065c69d8b1707de136b6bc48446f14c7e299fae..02b42c435b90d54e3b43d20766a45b40059a4333 100644
|
| --- a/device/u2f/u2f_device.cc
|
| +++ b/device/u2f/u2f_device.cc
|
| @@ -16,7 +16,7 @@ void U2fDevice::Register(const std::vector<uint8_t>& app_param,
|
| U2fDevice::ProtocolVersion version,
|
| const std::vector<uint8_t>& challenge_param,
|
| const MessageCallback& callback) {
|
| - scoped_refptr<U2fApduCommand> register_cmd =
|
| + std::unique_ptr<U2fApduCommand> register_cmd =
|
| U2fApduCommand::CreateRegister(app_param, challenge_param);
|
| if (!register_cmd) {
|
| callback.Run(ReturnCode::INVALID_PARAMS, std::vector<uint8_t>());
|
| @@ -31,7 +31,7 @@ void U2fDevice::Sign(const std::vector<uint8_t>& app_param,
|
| const std::vector<uint8_t>& challenge_param,
|
| const std::vector<uint8_t>& key_handle,
|
| const MessageCallback& callback) {
|
| - scoped_refptr<U2fApduCommand> sign_cmd =
|
| + std::unique_ptr<U2fApduCommand> sign_cmd =
|
| U2fApduCommand::CreateSign(app_param, challenge_param, key_handle);
|
| if (!sign_cmd) {
|
| callback.Run(ReturnCode::INVALID_PARAMS, std::vector<uint8_t>());
|
| @@ -43,7 +43,7 @@ void U2fDevice::Sign(const std::vector<uint8_t>& app_param,
|
| }
|
|
|
| void U2fDevice::Version(const VersionCallback& callback) {
|
| - scoped_refptr<U2fApduCommand> version_cmd = U2fApduCommand::CreateVersion();
|
| + std::unique_ptr<U2fApduCommand> version_cmd = U2fApduCommand::CreateVersion();
|
| if (!version_cmd) {
|
| callback.Run(false, ProtocolVersion::UNKNOWN);
|
| return;
|
| @@ -56,20 +56,20 @@ void U2fDevice::Version(const VersionCallback& callback) {
|
| void U2fDevice::OnRegisterComplete(
|
| const MessageCallback& callback,
|
| bool success,
|
| - scoped_refptr<U2fApduResponse> register_response) {
|
| + std::unique_ptr<U2fApduResponse> register_response) {
|
| NOTIMPLEMENTED();
|
| }
|
|
|
| void U2fDevice::OnSignComplete(const MessageCallback& callback,
|
| bool success,
|
| - scoped_refptr<U2fApduResponse> sign_response) {
|
| + std::unique_ptr<U2fApduResponse> sign_response) {
|
| NOTIMPLEMENTED();
|
| }
|
|
|
| void U2fDevice::OnVersionComplete(
|
| const VersionCallback& callback,
|
| bool success,
|
| - scoped_refptr<U2fApduResponse> version_response) {
|
| + std::unique_ptr<U2fApduResponse> version_response) {
|
| if (success && version_response &&
|
| version_response->status() == U2fApduResponse::Status::SW_NO_ERROR &&
|
| version_response->data() ==
|
| @@ -83,7 +83,7 @@ void U2fDevice::OnVersionComplete(
|
| void U2fDevice::OnLegacyVersionComplete(
|
| const VersionCallback& callback,
|
| bool success,
|
| - scoped_refptr<U2fApduResponse> legacy_version_response) {
|
| + std::unique_ptr<U2fApduResponse> legacy_version_response) {
|
| NOTIMPLEMENTED();
|
| }
|
|
|
|
|