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

Unified Diff: device/u2f/u2f_hid_device.h

Issue 2743623006: Modify U2F apdu classes to use unique pointers (Closed)
Patch Set: Use more concise form of base::Passed Created 3 years, 9 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.cc ('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 3e1f85257a5f405968ad0ec9d9b8bdef449ae496..0e7d0164d675bf06d5c557441b78f1afb02f3092 100644
--- a/device/u2f/u2f_hid_device.h
+++ b/device/u2f/u2f_hid_device.h
@@ -26,7 +26,7 @@ class U2fHidDevice : public U2fDevice {
~U2fHidDevice();
// Send a U2f command to this device
- void DeviceTransact(scoped_refptr<U2fApduCommand> command,
+ void DeviceTransact(std::unique_ptr<U2fApduCommand> command,
const DeviceCallback& callback) final;
// Send a wink command if supported
void TryWink(const WinkCallback& callback) final;
@@ -47,18 +47,18 @@ class U2fHidDevice : public U2fDevice {
// Open a connection to this device
void Connect(const HidService::ConnectCallback& callback);
- void OnConnect(scoped_refptr<U2fApduCommand> command,
+ void OnConnect(std::unique_ptr<U2fApduCommand> command,
const DeviceCallback& callback,
scoped_refptr<HidConnection> connection);
// Ask device to allocate a unique channel id for this connection
- void AllocateChannel(scoped_refptr<U2fApduCommand> command,
+ void AllocateChannel(std::unique_ptr<U2fApduCommand> command,
const DeviceCallback& callback);
void OnAllocateChannel(std::vector<uint8_t> nonce,
- scoped_refptr<U2fApduCommand> command,
+ std::unique_ptr<U2fApduCommand> command,
const DeviceCallback& callback,
bool success,
scoped_refptr<U2fMessage> message);
- void Transition(scoped_refptr<U2fApduCommand> command,
+ void Transition(std::unique_ptr<U2fApduCommand> command,
const DeviceCallback& callback);
// Write all message packets to device, and read response if expected
void WriteMessage(scoped_refptr<U2fMessage> message,
@@ -87,7 +87,7 @@ class U2fHidDevice : public U2fDevice {
scoped_refptr<U2fMessage> response);
State state_;
- std::list<std::pair<scoped_refptr<U2fApduCommand>, DeviceCallback>>
+ std::list<std::pair<std::unique_ptr<U2fApduCommand>, DeviceCallback>>
pending_transactions_;
scoped_refptr<HidDeviceInfo> device_info_;
scoped_refptr<HidConnection> connection_;
« no previous file with comments | « device/u2f/u2f_device.cc ('k') | device/u2f/u2f_hid_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698