| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_ | 5 #ifndef CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_ |
| 6 #define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_ | 6 #define CONTENT_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/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/string16.h" | 14 #include "base/string16.h" |
| 15 #include "base/task.h" | |
| 16 #include "base/threading/thread.h" | 15 #include "base/threading/thread.h" |
| 17 #include "content/browser/geolocation/device_data_provider.h" | 16 #include "content/browser/geolocation/device_data_provider.h" |
| 18 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
| 19 | 18 |
| 20 // Converts a MAC address stored as an array of uint8 to a string. | 19 // Converts a MAC address stored as an array of uint8 to a string. |
| 21 string16 MacAddressAsString16(const uint8 mac_as_int[6]); | 20 string16 MacAddressAsString16(const uint8 mac_as_int[6]); |
| 22 | 21 |
| 23 // Allows sharing and mocking of the update polling policy function. | 22 // Allows sharing and mocking of the update polling policy function. |
| 24 class PollingPolicyInterface { | 23 class PollingPolicyInterface { |
| 25 public: | 24 public: |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // Controls the polling update interval. | 118 // Controls the polling update interval. |
| 120 scoped_ptr<PollingPolicyInterface> polling_policy_; | 119 scoped_ptr<PollingPolicyInterface> polling_policy_; |
| 121 | 120 |
| 122 // Holder for the tasks which run on the thread; takes care of cleanup. | 121 // Holder for the tasks which run on the thread; takes care of cleanup. |
| 123 base::WeakPtrFactory<WifiDataProviderCommon> weak_factory_; | 122 base::WeakPtrFactory<WifiDataProviderCommon> weak_factory_; |
| 124 | 123 |
| 125 DISALLOW_COPY_AND_ASSIGN(WifiDataProviderCommon); | 124 DISALLOW_COPY_AND_ASSIGN(WifiDataProviderCommon); |
| 126 }; | 125 }; |
| 127 | 126 |
| 128 #endif // CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_ | 127 #endif // CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_ |
| OLD | NEW |