OLD | NEW |
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 #include "device/geolocation/wifi_data_provider_mac.h" | 5 #include "content/browser/geolocation/wifi_data_provider_mac.h" |
6 | 6 |
7 #include "device/geolocation/wifi_data_provider_common.h" | 7 #include "content/browser/geolocation/wifi_data_provider_common.h" |
8 #include "device/geolocation/wifi_data_provider_manager.h" | 8 #include "content/browser/geolocation/wifi_data_provider_manager.h" |
9 | 9 |
10 namespace device { | 10 namespace content { |
11 namespace { | 11 namespace { |
12 // The time periods, in milliseconds, between successive polls of the wifi data. | 12 // The time periods, in milliseconds, between successive polls of the wifi data. |
13 const int kDefaultPollingInterval = 120000; // 2 mins | 13 const int kDefaultPollingInterval = 120000; // 2 mins |
14 const int kNoChangePollingInterval = 300000; // 5 mins | 14 const int kNoChangePollingInterval = 300000; // 5 mins |
15 const int kTwoNoChangePollingInterval = 600000; // 10 mins | 15 const int kTwoNoChangePollingInterval = 600000; // 10 mins |
16 const int kNoWifiPollingIntervalMilliseconds = 20 * 1000; // 20s | 16 const int kNoWifiPollingIntervalMilliseconds = 20 * 1000; // 20s |
17 } // namespace | 17 } // namespace |
18 | 18 |
19 // static | 19 // static |
20 WifiDataProvider* WifiDataProviderManager::DefaultFactoryFunction() { | 20 WifiDataProvider* WifiDataProviderManager::DefaultFactoryFunction() { |
(...skipping 15 matching lines...) Expand all Loading... |
36 return NULL; | 36 return NULL; |
37 } | 37 } |
38 | 38 |
39 WifiPollingPolicy* WifiDataProviderMac::NewPollingPolicy() { | 39 WifiPollingPolicy* WifiDataProviderMac::NewPollingPolicy() { |
40 return new GenericWifiPollingPolicy<kDefaultPollingInterval, | 40 return new GenericWifiPollingPolicy<kDefaultPollingInterval, |
41 kNoChangePollingInterval, | 41 kNoChangePollingInterval, |
42 kTwoNoChangePollingInterval, | 42 kTwoNoChangePollingInterval, |
43 kNoWifiPollingIntervalMilliseconds>; | 43 kNoWifiPollingIntervalMilliseconds>; |
44 } | 44 } |
45 | 45 |
46 } // namespace device | 46 } // namespace content |
OLD | NEW |