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

Side by Side Diff: components/metrics/net/wifi_access_point_info_provider_chromeos.cc

Issue 819583004: Elim device log spam when translating ONC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_portal_detect_shutdown_crash
Patch Set: Rebase Created 5 years, 11 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
« no previous file with comments | « chromeos/network/shill_property_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "chromeos/network/network_configuration_handler.h" 10 #include "chromeos/network/network_configuration_handler.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 default_network->path(), 55 default_network->path(),
56 base::Bind(&WifiAccessPointInfoProviderChromeos::ParseInfo, 56 base::Bind(&WifiAccessPointInfoProviderChromeos::ParseInfo,
57 AsWeakPtr()), 57 AsWeakPtr()),
58 chromeos::network_handler::ErrorCallback()); 58 chromeos::network_handler::ErrorCallback());
59 } 59 }
60 60
61 void WifiAccessPointInfoProviderChromeos::ParseInfo( 61 void WifiAccessPointInfoProviderChromeos::ParseInfo(
62 const std::string &service_path, 62 const std::string &service_path,
63 const base::DictionaryValue& properties) { 63 const base::DictionaryValue& properties) {
64 // Skip services that contain "_nomap" in the SSID. 64 // Skip services that contain "_nomap" in the SSID.
65 std::string ssid = 65 std::string ssid = chromeos::shill_property_util::GetSSIDFromProperties(
66 chromeos::shill_property_util::GetSSIDFromProperties(properties, NULL); 66 properties, false /* verbose_logging */, nullptr);
67 if (ssid.find("_nomap", 0) != std::string::npos) 67 if (ssid.find("_nomap", 0) != std::string::npos)
68 return; 68 return;
69 69
70 std::string bssid; 70 std::string bssid;
71 if (!properties.GetStringWithoutPathExpansion(shill::kWifiBSsid, &bssid) || 71 if (!properties.GetStringWithoutPathExpansion(shill::kWifiBSsid, &bssid) ||
72 bssid.empty()) 72 bssid.empty())
73 return; 73 return;
74 74
75 // Filter out BSSID with local bit set in the first byte. 75 // Filter out BSSID with local bit set in the first byte.
76 uint32 first_octet; 76 uint32 first_octet;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 shill::kVendorWPSModelNameProperty, 113 shill::kVendorWPSModelNameProperty,
114 &wifi_access_point_info_.model_name); 114 &wifi_access_point_info_.model_name);
115 vendor_dict->GetStringWithoutPathExpansion( 115 vendor_dict->GetStringWithoutPathExpansion(
116 shill::kVendorWPSDeviceNameProperty, 116 shill::kVendorWPSDeviceNameProperty,
117 &wifi_access_point_info_.device_name); 117 &wifi_access_point_info_.device_name);
118 vendor_dict->GetStringWithoutPathExpansion(shill::kVendorOUIListProperty, 118 vendor_dict->GetStringWithoutPathExpansion(shill::kVendorOUIListProperty,
119 &wifi_access_point_info_.oui_list); 119 &wifi_access_point_info_.oui_list);
120 } 120 }
121 121
122 } // namespace metrics 122 } // namespace metrics
OLDNEW
« no previous file with comments | « chromeos/network/shill_property_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698