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

Side by Side Diff: components/metrics/net/wifi_access_point_info_provider_chromeos.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 4 years, 12 months 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 unified diff | Download patch
OLDNEW
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 "components/metrics/net/wifi_access_point_info_provider_chromeos.h" 5 #include "components/metrics/net/wifi_access_point_info_provider_chromeos.h"
6 6
7 #include <stdint.h>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/location.h" 10 #include "base/location.h"
9 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
10 #include "chromeos/network/network_configuration_handler.h" 12 #include "chromeos/network/network_configuration_handler.h"
11 #include "chromeos/network/network_handler.h" 13 #include "chromeos/network/network_handler.h"
12 #include "chromeos/network/network_state.h" 14 #include "chromeos/network/network_state.h"
13 #include "chromeos/network/network_state_handler.h" 15 #include "chromeos/network/network_state_handler.h"
14 #include "chromeos/network/shill_property_util.h" 16 #include "chromeos/network/shill_property_util.h"
15 #include "third_party/cros_system_api/dbus/service_constants.h" 17 #include "third_party/cros_system_api/dbus/service_constants.h"
16 18
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 properties, false /* verbose_logging */, nullptr); 67 properties, false /* verbose_logging */, nullptr);
66 if (ssid.find("_nomap", 0) != std::string::npos) 68 if (ssid.find("_nomap", 0) != std::string::npos)
67 return; 69 return;
68 70
69 std::string bssid; 71 std::string bssid;
70 if (!properties.GetStringWithoutPathExpansion(shill::kWifiBSsid, &bssid) || 72 if (!properties.GetStringWithoutPathExpansion(shill::kWifiBSsid, &bssid) ||
71 bssid.empty()) 73 bssid.empty())
72 return; 74 return;
73 75
74 // Filter out BSSID with local bit set in the first byte. 76 // Filter out BSSID with local bit set in the first byte.
75 uint32 first_octet; 77 uint32_t first_octet;
76 if (!base::HexStringToUInt(bssid.substr(0, 2), &first_octet)) 78 if (!base::HexStringToUInt(bssid.substr(0, 2), &first_octet))
77 NOTREACHED(); 79 NOTREACHED();
78 if (first_octet & 0x2) 80 if (first_octet & 0x2)
79 return; 81 return;
80 wifi_access_point_info_.bssid = bssid; 82 wifi_access_point_info_.bssid = bssid;
81 83
82 // Parse security info. 84 // Parse security info.
83 std::string security; 85 std::string security;
84 properties.GetStringWithoutPathExpansion( 86 properties.GetStringWithoutPathExpansion(
85 shill::kSecurityProperty, &security); 87 shill::kSecurityProperty, &security);
(...skipping 26 matching lines...) Expand all
112 shill::kVendorWPSModelNameProperty, 114 shill::kVendorWPSModelNameProperty,
113 &wifi_access_point_info_.model_name); 115 &wifi_access_point_info_.model_name);
114 vendor_dict->GetStringWithoutPathExpansion( 116 vendor_dict->GetStringWithoutPathExpansion(
115 shill::kVendorWPSDeviceNameProperty, 117 shill::kVendorWPSDeviceNameProperty,
116 &wifi_access_point_info_.device_name); 118 &wifi_access_point_info_.device_name);
117 vendor_dict->GetStringWithoutPathExpansion(shill::kVendorOUIListProperty, 119 vendor_dict->GetStringWithoutPathExpansion(shill::kVendorOUIListProperty,
118 &wifi_access_point_info_.oui_list); 120 &wifi_access_point_info_.oui_list);
119 } 121 }
120 122
121 } // namespace metrics 123 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/net/wifi_access_point_info_provider_chromeos.h ('k') | components/metrics/persisted_logs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698