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 <stddef.h> |
| 6 |
5 #include <iterator> | 7 #include <iterator> |
6 | 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 #include "device/usb/webusb_descriptors.h" | 10 #include "device/usb/webusb_descriptors.h" |
9 | 11 |
10 namespace device { | 12 namespace device { |
11 | 13 |
12 namespace { | 14 namespace { |
13 | 15 |
14 // These constants are defined by the Universal Serial Device 3.0 Specification | 16 // These constants are defined by the Universal Serial Device 3.0 Specification |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 } | 295 } |
294 uint8_t length = bytes[0]; | 296 uint8_t length = bytes[0]; |
295 if (length != bytes.size() || bytes[1] != kUrlDescriptorType) { | 297 if (length != bytes.size() || bytes[1] != kUrlDescriptorType) { |
296 return false; | 298 return false; |
297 } | 299 } |
298 std::vector<uint8_t>::const_iterator it = bytes.begin(); | 300 std::vector<uint8_t>::const_iterator it = bytes.begin(); |
299 return ParseUrl(output, &it, bytes.end()); | 301 return ParseUrl(output, &it, bytes.end()); |
300 } | 302 } |
301 | 303 |
302 } // namespace device | 304 } // namespace device |
OLD | NEW |