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

Unified Diff: device/u2f/mock_u2f_device.h

Issue 2842003002: Reuse WeakFactory from U2fDevice derived classes (Closed)
Patch Set: 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 | « no previous file | device/u2f/mock_u2f_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/u2f/mock_u2f_device.h
diff --git a/device/u2f/mock_u2f_device.h b/device/u2f/mock_u2f_device.h
index f4e65da0524418633169f24d71ed0e8c4e996eca..fcd7b27af9d9eb6c7a9e4d3e717fe5274d5a2603 100644
--- a/device/u2f/mock_u2f_device.h
+++ b/device/u2f/mock_u2f_device.h
@@ -29,6 +29,7 @@ class MockU2fDevice : public U2fDevice {
void(U2fApduCommand* command, const DeviceCallback& cb));
void DeviceTransact(std::unique_ptr<U2fApduCommand> command,
const DeviceCallback& cb) override;
+ base::WeakPtr<U2fDevice> GetWeakPtr() override;
static void TransactNoError(std::unique_ptr<U2fApduCommand> command,
const DeviceCallback& cb);
static void NotSatisfied(U2fApduCommand* cmd, const DeviceCallback& cb);
@@ -36,6 +37,9 @@ class MockU2fDevice : public U2fDevice {
static void NoErrorSign(U2fApduCommand* cmd, const DeviceCallback& cb);
static void NoErrorRegister(U2fApduCommand* cmd, const DeviceCallback& cb);
static void WinkDoNothing(const WinkCallback& cb);
+
+ private:
+ base::WeakPtrFactory<U2fDevice> weak_factory_;
};
} // namespace device
« no previous file with comments | « no previous file | device/u2f/mock_u2f_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698