Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(569)

Unified Diff: components/metrics/machine_id_provider_win.cc

Issue 1548113002: Switch to standard integer types in components/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/metrics/leak_detector/ranked_list_unittest.cc ('k') | components/metrics/metrics_log.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/machine_id_provider_win.cc
diff --git a/components/metrics/machine_id_provider_win.cc b/components/metrics/machine_id_provider_win.cc
index 8ec8a0c26b6e9592623a72fdd898c389878f38d7..41079a7dc2cfc54fba5b669b7eae0757785e84aa 100644
--- a/components/metrics/machine_id_provider_win.cc
+++ b/components/metrics/machine_id_provider_win.cc
@@ -5,6 +5,7 @@
#include "components/metrics/machine_id_provider.h"
#include <windows.h>
+#include <stdint.h>
#include <winioctl.h>
#include "base/base_paths.h"
@@ -73,7 +74,7 @@ std::string MachineIdProvider::GetMachineId() {
return std::string();
// Query for the actual serial number.
- std::vector<int8> output_buf(header.Size);
+ std::vector<int8_t> output_buf(header.Size);
status = DeviceIoControl(drive_handle.Get(),
IOCTL_STORAGE_QUERY_PROPERTY,
&query,
@@ -96,9 +97,9 @@ std::string MachineIdProvider::GetMachineId() {
return std::string();
// Make sure that the null-terminator exists.
- const std::vector<int8>::iterator serial_number_begin =
+ const std::vector<int8_t>::iterator serial_number_begin =
output_buf.begin() + offset;
- const std::vector<int8>::iterator null_location =
+ const std::vector<int8_t>::iterator null_location =
std::find(serial_number_begin, output_buf.end(), '\0');
if (null_location == output_buf.end())
return std::string();
« no previous file with comments | « components/metrics/leak_detector/ranked_list_unittest.cc ('k') | components/metrics/metrics_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698