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

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

Issue 2192683002: Reland 2:Geolocation: move from content/browser to device/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ignore size_t_to_int truncation warning Created 4 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
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 "content/browser/geolocation/wifi_data_provider_mac.h"
6
7 #include "content/browser/geolocation/wifi_data_provider_common.h"
8 #include "content/browser/geolocation/wifi_data_provider_manager.h"
9
10 namespace content {
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
27 WifiDataProviderMac::~WifiDataProviderMac() {
28 }
29
30 WifiDataProviderMac::WlanApiInterface* WifiDataProviderMac::NewWlanApi() {
31 WifiDataProviderMac::WlanApiInterface* core_wlan_api = NewCoreWlanApi();
32 if (core_wlan_api)
33 return core_wlan_api;
34
35 DVLOG(1) << "WifiDataProviderMac : failed to initialize any wlan api";
36 return NULL;
37 }
38
39 WifiPollingPolicy* WifiDataProviderMac::NewPollingPolicy() {
40 return new GenericWifiPollingPolicy<kDefaultPollingInterval,
41 kNoChangePollingInterval,
42 kTwoNoChangePollingInterval,
43 kNoWifiPollingIntervalMilliseconds>;
44 }
45
46 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geolocation/wifi_data_provider_mac.h ('k') | content/browser/geolocation/wifi_data_provider_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698