| OLD | NEW |
| 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 "device/test/test_device_client.h" | 5 #include "device/test/test_device_client.h" |
| 6 | 6 |
| 7 #include "base/single_thread_task_runner.h" |
| 7 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 8 | 9 |
| 9 // This file unconditionally includes these headers despite conditionally | 10 // This file unconditionally includes these headers despite conditionally |
| 10 // depending on the corresponding targets. The code below needs the destructors | 11 // depending on the corresponding targets. The code below needs the destructors |
| 11 // of the classes defined even when the classes are never instantiated. | 12 // of the classes defined even when the classes are never instantiated. |
| 12 // TODO: This should probably be done more explicitly to avoid ambiguity. | 13 // TODO: This should probably be done more explicitly to avoid ambiguity. |
| 13 #include "device/hid/hid_service.h" // nogncheck | 14 #include "device/hid/hid_service.h" // nogncheck |
| 14 #include "device/usb/usb_service.h" // nogncheck | 15 #include "device/usb/usb_service.h" // nogncheck |
| 15 | 16 |
| 16 namespace device { | 17 namespace device { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 38 UsbService* TestDeviceClient::GetUsbService() { | 39 UsbService* TestDeviceClient::GetUsbService() { |
| 39 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 40 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
| 40 if (!usb_service_) { | 41 if (!usb_service_) { |
| 41 usb_service_ = UsbService::Create(blocking_task_runner_); | 42 usb_service_ = UsbService::Create(blocking_task_runner_); |
| 42 } | 43 } |
| 43 #endif | 44 #endif |
| 44 return usb_service_.get(); | 45 return usb_service_.get(); |
| 45 } | 46 } |
| 46 | 47 |
| 47 } // namespace device | 48 } // namespace device |
| OLD | NEW |