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

Unified Diff: device/u2f/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 | « device/u2f/mock_u2f_device.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 77c8133ff5afd7d613516366695dca1a9fdfce04..9537d44bac422e5c3d795ebee7461cc6b788028b 100644
--- a/device/u2f/u2f_device.h
+++ b/device/u2f/u2f_device.h
@@ -60,6 +60,7 @@ class U2fDevice {
// the device communication transaction.
virtual void DeviceTransact(std::unique_ptr<U2fApduCommand> command,
const DeviceCallback& callback) = 0;
+ virtual base::WeakPtr<U2fDevice> GetWeakPtr() = 0;
uint32_t channel_id_;
uint8_t capabilities_;
@@ -82,8 +83,6 @@ class U2fDevice {
bool success,
std::unique_ptr<U2fApduResponse> response);
- base::WeakPtrFactory<U2fDevice> weak_factory_;
-
DISALLOW_COPY_AND_ASSIGN(U2fDevice);
};
« no previous file with comments | « device/u2f/mock_u2f_device.cc ('k') | device/u2f/u2f_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698