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

Side by Side Diff: device/core/mock_device_client.h

Issue 1874313002: Convert device to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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 unified diff | Download patch
« no previous file with comments | « device/core/device_monitor_win.cc ('k') | device/hid/device_monitor_linux.h » ('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 #ifndef DEVICE_CORE_MOCK_DEVICE_CLIENT_H_ 5 #ifndef DEVICE_CORE_MOCK_DEVICE_CLIENT_H_
6 #define DEVICE_CORE_MOCK_DEVICE_CLIENT_H_ 6 #define DEVICE_CORE_MOCK_DEVICE_CLIENT_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include <memory>
9
9 #include "device/core/device_client.h" 10 #include "device/core/device_client.h"
10 11
11 namespace device { 12 namespace device {
12 13
13 class HidService; 14 class HidService;
14 class MockHidService; 15 class MockHidService;
15 class MockUsbService; 16 class MockUsbService;
16 class UsbService; 17 class UsbService;
17 18
18 class MockDeviceClient : device::DeviceClient { 19 class MockDeviceClient : device::DeviceClient {
19 public: 20 public:
20 MockDeviceClient(); 21 MockDeviceClient();
21 ~MockDeviceClient() override; 22 ~MockDeviceClient() override;
22 23
23 // device::DeviceClient implementation: 24 // device::DeviceClient implementation:
24 UsbService* GetUsbService() override; 25 UsbService* GetUsbService() override;
25 HidService* GetHidService() override; 26 HidService* GetHidService() override;
26 27
27 // Accessors for the mock instances. 28 // Accessors for the mock instances.
28 MockHidService* hid_service(); 29 MockHidService* hid_service();
29 MockUsbService* usb_service(); 30 MockUsbService* usb_service();
30 31
31 private: 32 private:
32 scoped_ptr<MockHidService> hid_service_; 33 std::unique_ptr<MockHidService> hid_service_;
33 scoped_ptr<MockUsbService> usb_service_; 34 std::unique_ptr<MockUsbService> usb_service_;
34 }; 35 };
35 36
36 } // namespace device 37 } // namespace device
37 38
38 #endif // DEVICE_CORE_MOCK_DEVICE_CLIENT_H_ 39 #endif // DEVICE_CORE_MOCK_DEVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « device/core/device_monitor_win.cc ('k') | device/hid/device_monitor_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698