| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/serial/serial_service_impl.h" | 5 #include "device/serial/serial_service_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "base/bind.h" | 9 #include "base/bind.h" |
| 8 #include "base/location.h" | 10 #include "base/location.h" |
| 9 #include "device/serial/serial_io_handler.h" | 11 #include "device/serial/serial_io_handler.h" |
| 10 | 12 |
| 11 namespace device { | 13 namespace device { |
| 12 | 14 |
| 13 SerialServiceImpl::SerialServiceImpl( | 15 SerialServiceImpl::SerialServiceImpl( |
| 14 scoped_refptr<SerialConnectionFactory> connection_factory, | 16 scoped_refptr<SerialConnectionFactory> connection_factory, |
| 15 mojo::InterfaceRequest<serial::SerialService> request) | 17 mojo::InterfaceRequest<serial::SerialService> request) |
| 16 : connection_factory_(connection_factory), binding_(this, request.Pass()) { | 18 : connection_factory_(connection_factory), binding_(this, request.Pass()) { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 mojo::Array<serial::DeviceInfoPtr> devices( | 83 mojo::Array<serial::DeviceInfoPtr> devices( |
| 82 GetDeviceEnumerator()->GetDevices()); | 84 GetDeviceEnumerator()->GetDevices()); |
| 83 for (size_t i = 0; i < devices.size(); i++) { | 85 for (size_t i = 0; i < devices.size(); i++) { |
| 84 if (path == devices[i]->path) | 86 if (path == devices[i]->path) |
| 85 return true; | 87 return true; |
| 86 } | 88 } |
| 87 return false; | 89 return false; |
| 88 } | 90 } |
| 89 | 91 |
| 90 } // namespace device | 92 } // namespace device |
| OLD | NEW |