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

Side by Side Diff: content/browser/geolocation/wifi_data_provider_mac.cc

Issue 476133003: Rename platform specific wifi data provider classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reanem unittest file for consistency. Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // For OSX 10.5 we use the system API function WirelessScanSplit. This function 5 // For OSX 10.5 we use the system API function WirelessScanSplit. This function
6 // is not documented or included in the SDK, so we use a reverse-engineered 6 // is not documented or included in the SDK, so we use a reverse-engineered
7 // header, osx_wifi_.h. This file is taken from the iStumbler project 7 // header, osx_wifi_.h. This file is taken from the iStumbler project
8 // (http://www.istumbler.net). 8 // (http://www.istumbler.net).
9 9
10 #include "content/browser/geolocation/wifi_data_provider_mac.h" 10 #include "content/browser/geolocation/wifi_data_provider_mac.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 CFRelease(managed_access_points); 153 CFRelease(managed_access_points);
154 if (adhoc_access_points) 154 if (adhoc_access_points)
155 CFRelease(adhoc_access_points); 155 CFRelease(adhoc_access_points);
156 156
157 return true; 157 return true;
158 } 158 }
159 } // namespace 159 } // namespace
160 160
161 // static 161 // static
162 WifiDataProviderImplBase* WifiDataProvider::DefaultFactoryFunction() { 162 WifiDataProviderImplBase* WifiDataProvider::DefaultFactoryFunction() {
163 return new MacWifiDataProvider(); 163 return new WifiDataProviderMac();
164 } 164 }
165 165
166 MacWifiDataProvider::MacWifiDataProvider() { 166 WifiDataProviderMac::WifiDataProviderMac() {
167 } 167 }
168 168
169 MacWifiDataProvider::~MacWifiDataProvider() { 169 WifiDataProviderMac::~WifiDataProviderMac() {
170 } 170 }
171 171
172 MacWifiDataProvider::WlanApiInterface* MacWifiDataProvider::NewWlanApi() { 172 WifiDataProviderMac::WlanApiInterface* WifiDataProviderMac::NewWlanApi() {
173 // Try and find a API binding that works: first try the officially supported 173 // Try and find a API binding that works: first try the officially supported
174 // CoreWLAN API, and if this fails (e.g. on OSX 10.5) fall back to the reverse 174 // CoreWLAN API, and if this fails (e.g. on OSX 10.5) fall back to the reverse
175 // engineered Apple80211 API. 175 // engineered Apple80211 API.
176 MacWifiDataProvider::WlanApiInterface* core_wlan_api = NewCoreWlanApi(); 176 WifiDataProviderMac::WlanApiInterface* core_wlan_api = NewCoreWlanApi();
177 if (core_wlan_api) 177 if (core_wlan_api)
178 return core_wlan_api; 178 return core_wlan_api;
179 179
180 scoped_ptr<Apple80211Api> wlan_api(new Apple80211Api); 180 scoped_ptr<Apple80211Api> wlan_api(new Apple80211Api);
181 if (wlan_api->Init()) 181 if (wlan_api->Init())
182 return wlan_api.release(); 182 return wlan_api.release();
183 183
184 DVLOG(1) << "MacWifiDataProvider : failed to initialize any wlan api"; 184 DVLOG(1) << "WifiDataProviderMac : failed to initialize any wlan api";
185 return NULL; 185 return NULL;
186 } 186 }
187 187
188 WifiPollingPolicy* MacWifiDataProvider::NewPollingPolicy() { 188 WifiPollingPolicy* WifiDataProviderMac::NewPollingPolicy() {
189 return new GenericWifiPollingPolicy<kDefaultPollingInterval, 189 return new GenericWifiPollingPolicy<kDefaultPollingInterval,
190 kNoChangePollingInterval, 190 kNoChangePollingInterval,
191 kTwoNoChangePollingInterval, 191 kTwoNoChangePollingInterval,
192 kNoWifiPollingIntervalMilliseconds>; 192 kNoWifiPollingIntervalMilliseconds>;
193 } 193 }
194 194
195 } // namespace content 195 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geolocation/wifi_data_provider_mac.h ('k') | content/browser/geolocation/wifi_data_provider_unittest_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698