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

Side by Side Diff: device/geolocation/wifi_data_provider_mac.cc

Issue 2472463002: [Mac] Use CoreWLAN directly now that macOS 10.9 is the minimum version. (Closed)
Patch Set: Created 4 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "device/geolocation/wifi_data_provider_mac.h"
6
7 #include "device/geolocation/wifi_data_provider_common.h"
8 #include "device/geolocation/wifi_data_provider_manager.h"
9
10 namespace device {
11 namespace {
12 // The time periods, in milliseconds, between successive polls of the wifi data.
13 const int kDefaultPollingInterval = 120000; // 2 mins
14 const int kNoChangePollingInterval = 300000; // 5 mins
15 const int kTwoNoChangePollingInterval = 600000; // 10 mins
16 const int kNoWifiPollingIntervalMilliseconds = 20 * 1000; // 20s
17 } // namespace
18
19 // static
20 WifiDataProvider* WifiDataProviderManager::DefaultFactoryFunction() {
21 return new WifiDataProviderMac();
22 }
23
24 WifiDataProviderMac::WifiDataProviderMac() {}
25
26 WifiDataProviderMac::~WifiDataProviderMac() {}
27
28 WifiDataProviderMac::WlanApiInterface* WifiDataProviderMac::NewWlanApi() {
29 WifiDataProviderMac::WlanApiInterface* core_wlan_api = NewCoreWlanApi();
30 if (core_wlan_api)
31 return core_wlan_api;
32
33 DVLOG(1) << "WifiDataProviderMac : failed to initialize any wlan api";
34 return NULL;
35 }
36
37 WifiPollingPolicy* WifiDataProviderMac::NewPollingPolicy() {
38 return new GenericWifiPollingPolicy<
39 kDefaultPollingInterval, kNoChangePollingInterval,
40 kTwoNoChangePollingInterval, kNoWifiPollingIntervalMilliseconds>;
41 }
42
43 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698