Extensions: Store disable reasons in Sync
[chromium-blink-merge.git] / device / usb / mock_usb_service.h
blob31cecaf6611004cebd8762f31e971b565fb05b5a
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
3 // found in the LICENSE file.
5 #ifndef DEVICE_USB_MOCK_USB_SERVICE_H_
6 #define DEVICE_USB_MOCK_USB_SERVICE_H_
8 #include "device/usb/usb_service.h"
10 #include "testing/gmock/include/gmock/gmock.h"
12 namespace device {
14 class MockUsbService : public UsbService {
15 public:
16 MockUsbService();
17 ~MockUsbService() override;
19 void AddDevice(scoped_refptr<UsbDevice> device);
20 void RemoveDevice(scoped_refptr<UsbDevice> device);
22 protected:
23 // UsbService implementation:
24 scoped_refptr<UsbDevice> GetDeviceById(uint32 unique_id) override;
25 void GetDevices(const GetDevicesCallback& callback) override;
27 std::map<uint32, scoped_refptr<UsbDevice>> devices_;
30 } // namespace device
32 #endif // DEVICE_USB_MOCK_USB_SERVICE_H_