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

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

Issue 10535157: [WIP] attempt to allow chrome OS to inject its wifi data provider (Closed) Base URL: http://git.chromium.org/chromium/src.git@remove_radio
Patch Set: Created 8 years, 6 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 (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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 if (managed_access_points) 150 if (managed_access_points)
151 CFRelease(managed_access_points); 151 CFRelease(managed_access_points);
152 if (adhoc_access_points) 152 if (adhoc_access_points)
153 CFRelease(adhoc_access_points); 153 CFRelease(adhoc_access_points);
154 154
155 return true; 155 return true;
156 } 156 }
157 } // namespace 157 } // namespace
158 158
159 // static 159 // static
160 template<>
161 WifiDataProviderImplBase* WifiDataProvider::DefaultFactoryFunction() { 160 WifiDataProviderImplBase* WifiDataProvider::DefaultFactoryFunction() {
162 return new MacWifiDataProvider(); 161 return new MacWifiDataProvider();
163 } 162 }
164 163
165 MacWifiDataProvider::MacWifiDataProvider() { 164 MacWifiDataProvider::MacWifiDataProvider() {
166 } 165 }
167 166
168 MacWifiDataProvider::~MacWifiDataProvider() { 167 MacWifiDataProvider::~MacWifiDataProvider() {
169 } 168 }
170 169
(...skipping 12 matching lines...) Expand all
183 DVLOG(1) << "MacWifiDataProvider : failed to initialize any wlan api"; 182 DVLOG(1) << "MacWifiDataProvider : failed to initialize any wlan api";
184 return NULL; 183 return NULL;
185 } 184 }
186 185
187 PollingPolicyInterface* MacWifiDataProvider::NewPollingPolicy() { 186 PollingPolicyInterface* MacWifiDataProvider::NewPollingPolicy() {
188 return new GenericPollingPolicy<kDefaultPollingInterval, 187 return new GenericPollingPolicy<kDefaultPollingInterval,
189 kNoChangePollingInterval, 188 kNoChangePollingInterval,
190 kTwoNoChangePollingInterval, 189 kTwoNoChangePollingInterval,
191 kNoWifiPollingIntervalMilliseconds>; 190 kNoWifiPollingIntervalMilliseconds>;
192 } 191 }
OLDNEW
« no previous file with comments | « content/browser/geolocation/wifi_data_provider_linux.cc ('k') | content/browser/geolocation/wifi_data_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698