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 #ifndef CHROME_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_ | 5 #ifndef CHROME_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_ |
6 #define CHROME_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_ | 6 #define CHROME_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <assert.h> | 9 #include <assert.h> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
13 #include "base/string16.h" | 13 #include "base/string16.h" |
14 #include "base/task.h" | 14 #include "base/task.h" |
15 #include "base/thread.h" | 15 #include "base/threading/thread.h" |
16 #include "chrome/browser/geolocation/device_data_provider.h" | 16 #include "chrome/browser/geolocation/device_data_provider.h" |
17 | 17 |
18 // Converts a MAC address stored as an array of uint8 to a string. | 18 // Converts a MAC address stored as an array of uint8 to a string. |
19 string16 MacAddressAsString16(const uint8 mac_as_int[6]); | 19 string16 MacAddressAsString16(const uint8 mac_as_int[6]); |
20 | 20 |
21 // Allows sharing and mocking of the update polling policy function. | 21 // Allows sharing and mocking of the update polling policy function. |
22 class PollingPolicyInterface { | 22 class PollingPolicyInterface { |
23 public: | 23 public: |
24 virtual ~PollingPolicyInterface() {} | 24 virtual ~PollingPolicyInterface() {} |
25 // Calculates the new polling interval for wiFi scans, given the previous | 25 // Calculates the new polling interval for wiFi scans, given the previous |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // Controls the polling update interval. | 117 // Controls the polling update interval. |
118 scoped_ptr<PollingPolicyInterface> polling_policy_; | 118 scoped_ptr<PollingPolicyInterface> polling_policy_; |
119 | 119 |
120 // Holder for the tasks which run on the thread; takes care of cleanup. | 120 // Holder for the tasks which run on the thread; takes care of cleanup. |
121 ScopedRunnableMethodFactory<WifiDataProviderCommon> task_factory_; | 121 ScopedRunnableMethodFactory<WifiDataProviderCommon> task_factory_; |
122 | 122 |
123 DISALLOW_COPY_AND_ASSIGN(WifiDataProviderCommon); | 123 DISALLOW_COPY_AND_ASSIGN(WifiDataProviderCommon); |
124 }; | 124 }; |
125 | 125 |
126 #endif // CHROME_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_ | 126 #endif // CHROME_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_ |
OLD | NEW |