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/core/device_info_query_win.h" | 5 #include "device/core/device_info_query_win.h" |
6 | 6 |
| 7 #include <stddef.h> |
7 #include <string.h> | 8 #include <string.h> |
8 | 9 |
9 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
10 | 11 |
11 namespace device { | 12 namespace device { |
12 | 13 |
13 DeviceInfoQueryWin::DeviceInfoQueryWin() | 14 DeviceInfoQueryWin::DeviceInfoQueryWin() |
14 : device_info_list_(SetupDiCreateDeviceInfoList(nullptr, nullptr)) { | 15 : device_info_list_(SetupDiCreateDeviceInfoList(nullptr, nullptr)) { |
15 memset(&device_info_data_, 0, sizeof(device_info_data_)); | 16 memset(&device_info_data_, 0, sizeof(device_info_data_)); |
16 } | 17 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 58 |
58 // Shrink |property_buffer| down to its correct size. | 59 // Shrink |property_buffer| down to its correct size. |
59 size_t eos = property_buffer->find('\0'); | 60 size_t eos = property_buffer->find('\0'); |
60 if (eos != std::string::npos) | 61 if (eos != std::string::npos) |
61 property_buffer->resize(eos); | 62 property_buffer->resize(eos); |
62 | 63 |
63 return true; | 64 return true; |
64 } | 65 } |
65 | 66 |
66 } // namespace device | 67 } // namespace device |
OLD | NEW |