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

Side by Side Diff: content/browser/geolocation/wifi_data_provider_corewlan_mac.mm

Issue 547693002: Fix the number of buckets in Net.Wifi.InterfaceCount UMA histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | content/browser/geolocation/wifi_data_provider_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Implements a WLAN API binding for CoreWLAN, as available on OSX 10.6 5 // Implements a WLAN API binding for CoreWLAN, as available on OSX 10.6
6 6
7 #include "content/browser/geolocation/wifi_data_provider_mac.h" 7 #include "content/browser/geolocation/wifi_data_provider_mac.h"
8 8
9 #include <dlfcn.h> 9 #include <dlfcn.h>
10 #import <Foundation/Foundation.h> 10 #import <Foundation/Foundation.h>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 access_point_data.ssid = base::SysNSStringToUTF16([network ssid]); 161 access_point_data.ssid = base::SysNSStringToUTF16([network ssid]);
162 data->insert(access_point_data); 162 data->insert(access_point_data);
163 } 163 }
164 } 164 }
165 165
166 UMA_HISTOGRAM_CUSTOM_COUNTS( 166 UMA_HISTOGRAM_CUSTOM_COUNTS(
167 "Net.Wifi.InterfaceCount", 167 "Net.Wifi.InterfaceCount",
168 [supported_interfaces count] - interface_error_count, 168 [supported_interfaces count] - interface_error_count,
169 1, 169 1,
170 5, 170 5,
171 5); 171 6);
172 172
173 // Return true even if some interfaces failed to scan, so long as at least 173 // Return true even if some interfaces failed to scan, so long as at least
174 // one interface did not fail. 174 // one interface did not fail.
175 return interface_error_count == 0 || 175 return interface_error_count == 0 ||
176 [supported_interfaces count] > interface_error_count; 176 [supported_interfaces count] > interface_error_count;
177 } 177 }
178 178
179 WifiDataProviderCommon::WlanApiInterface* NewCoreWlanApi() { 179 WifiDataProviderCommon::WlanApiInterface* NewCoreWlanApi() {
180 scoped_ptr<CoreWlanApi> self(new CoreWlanApi); 180 scoped_ptr<CoreWlanApi> self(new CoreWlanApi);
181 if (self->Init()) 181 if (self->Init())
182 return self.release(); 182 return self.release();
183 183
184 return NULL; 184 return NULL;
185 } 185 }
186 186
187 } // namespace content 187 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/geolocation/wifi_data_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698