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

Unified Diff: device/u2f/u2f_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_apdu_unittest.cc ('k') | device/u2f/u2f_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/u2f/u2f_device.h
diff --git a/device/u2f/u2f_device.h b/device/u2f/u2f_device.h
index 20994b757426d0dfa46c1e53c128182c4582ba1d..3a7e9161ac85f6f3bbfd1df1192313bb3f9f3343 100644
--- a/device/u2f/u2f_device.h
+++ b/device/u2f/u2f_device.h
@@ -36,7 +36,7 @@ class U2fDevice {
base::Callback<void(bool success, ProtocolVersion version)>;
using DeviceCallback =
base::Callback<void(bool success,
- scoped_refptr<U2fApduResponse> response)>;
+ std::unique_ptr<U2fApduResponse> response)>;
using WinkCallback = base::Callback<void()>;
~U2fDevice();
@@ -63,7 +63,7 @@ class U2fDevice {
// Pure virtual function defined by each device type, implementing
// the device communication transaction.
- virtual void DeviceTransact(scoped_refptr<U2fApduCommand> command,
+ virtual void DeviceTransact(std::unique_ptr<U2fApduCommand> command,
const DeviceCallback& callback) = 0;
uint32_t channel_id_;
@@ -72,20 +72,20 @@ class U2fDevice {
private:
void OnRegisterComplete(const MessageCallback& callback,
bool success,
- scoped_refptr<U2fApduResponse> register_response);
+ std::unique_ptr<U2fApduResponse> register_response);
void OnSignComplete(const MessageCallback& callback,
bool success,
- scoped_refptr<U2fApduResponse> sign_response);
+ std::unique_ptr<U2fApduResponse> sign_response);
void OnVersionComplete(const VersionCallback& callback,
bool success,
- scoped_refptr<U2fApduResponse> version_response);
+ std::unique_ptr<U2fApduResponse> version_response);
void OnLegacyVersionComplete(
const VersionCallback& callback,
bool success,
- scoped_refptr<U2fApduResponse> legacy_version_response);
+ std::unique_ptr<U2fApduResponse> legacy_version_response);
void OnWink(const WinkCallback& callback,
bool success,
- scoped_refptr<U2fApduResponse> response);
+ std::unique_ptr<U2fApduResponse> response);
base::WeakPtrFactory<U2fDevice> weak_factory_;
« no previous file with comments | « device/u2f/u2f_apdu_unittest.cc ('k') | device/u2f/u2f_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698