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

Side by Side Diff: device/test/test_device_client.h

Issue 1312993008: Manage HidService lifetime in DeviceClient implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_usb_service_get_instance
Patch Set: Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « device/hid/hid_service_win.cc ('k') | device/test/test_device_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/memory/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "device/core/device_client.h" 7 #include "device/core/device_client.h"
8 8
9 namespace base { 9 namespace base {
10 class SingleThreadTaskRunner; 10 class SingleThreadTaskRunner;
11 } 11 }
12 12
13 namespace device { 13 namespace device {
14 14
15 class HidService; 15 class HidService;
16 class UsbService; 16 class UsbService;
17 17
18 class TestDeviceClient : public DeviceClient { 18 class TestDeviceClient : public DeviceClient {
19 public: 19 public:
20 TestDeviceClient(scoped_refptr<base::SingleThreadTaskRunner> task_runner); 20 TestDeviceClient(scoped_refptr<base::SingleThreadTaskRunner> task_runner);
21 ~TestDeviceClient() override; 21 ~TestDeviceClient() override;
22 22
23 private: 23 private:
24 HidService* GetHidService() override; 24 HidService* GetHidService() override;
25 UsbService* GetUsbService() override; 25 UsbService* GetUsbService() override;
26 26
27 scoped_ptr<HidService> hid_service_;
27 scoped_ptr<UsbService> usb_service_; 28 scoped_ptr<UsbService> usb_service_;
28 scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner_; 29 scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner_;
29 }; 30 };
30 31
31 } // namespace device 32 } // namespace device
OLDNEW
« no previous file with comments | « device/hid/hid_service_win.cc ('k') | device/test/test_device_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698