| 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/udev_linux/udev.h" | 5 #include "device/udev_linux/udev.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 8 #include "device/udev_linux/udev_loader.h" | 10 #include "device/udev_linux/udev_loader.h" |
| 9 | 11 |
| 10 namespace device { | 12 namespace device { |
| 11 | 13 |
| 12 namespace { | 14 namespace { |
| 13 | 15 |
| 14 std::string StringOrEmptyIfNull(const char* value) { | 16 std::string StringOrEmptyIfNull(const char* value) { |
| 15 return value ? value : std::string(); | 17 return value ? value : std::string(); |
| 16 } | 18 } |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 c = (base::HexDigitToInt(encoded[i + 2]) << 4) + | 176 c = (base::HexDigitToInt(encoded[i + 2]) << 4) + |
| 175 base::HexDigitToInt(encoded[i + 3]); | 177 base::HexDigitToInt(encoded[i + 3]); |
| 176 i += 3; | 178 i += 3; |
| 177 } | 179 } |
| 178 decoded.push_back(c); | 180 decoded.push_back(c); |
| 179 } | 181 } |
| 180 return decoded; | 182 return decoded; |
| 181 } | 183 } |
| 182 | 184 |
| 183 } // namespace device | 185 } // namespace device |
| OLD | NEW |