OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "u2f_hid_device.h" | 5 #include "u2f_hid_device.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 id << device_info_->device_id(); | 335 id << device_info_->device_id(); |
336 return id.str(); | 336 return id.str(); |
337 } | 337 } |
338 | 338 |
339 // static | 339 // static |
340 bool U2fHidDevice::IsTestEnabled() { | 340 bool U2fHidDevice::IsTestEnabled() { |
341 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 341 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
342 return command_line->HasSwitch(switches::kEnableU2fHidTest); | 342 return command_line->HasSwitch(switches::kEnableU2fHidTest); |
343 } | 343 } |
344 | 344 |
| 345 base::WeakPtr<U2fDevice> U2fHidDevice::GetWeakPtr() { |
| 346 return weak_factory_.GetWeakPtr(); |
| 347 } |
| 348 |
345 } // namespace device | 349 } // namespace device |
OLD | NEW |