Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ | 5 #ifndef DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ |
| 6 #define DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ | 6 #define DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 CacheAgeList cache_age_list_; // Oldest first. | 63 CacheAgeList cache_age_list_; // Oldest first. |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 NetworkLocationProvider( | 66 NetworkLocationProvider( |
| 67 const scoped_refptr<AccessTokenStore>& access_token_store, | 67 const scoped_refptr<AccessTokenStore>& access_token_store, |
| 68 const scoped_refptr<net::URLRequestContextGetter>& context, | 68 const scoped_refptr<net::URLRequestContextGetter>& context, |
| 69 const GURL& url, | 69 const GURL& url, |
| 70 const base::string16& access_token); | 70 const base::string16& access_token); |
| 71 ~NetworkLocationProvider() override; | 71 ~NetworkLocationProvider() override; |
| 72 | 72 |
| 73 // LocationProviderBase implemenation. | |
| 74 void RequestRefresh() override; | |
|
Wez
2016/08/12 00:33:44
There doesn't seem to be any need for this to be p
CJ
2016/08/12 20:22:46
Done.
| |
| 75 | |
| 73 // LocationProvider implementation | 76 // LocationProvider implementation |
| 74 bool StartProvider(bool high_accuracy) override; | 77 bool StartProvider(bool high_accuracy) override; |
| 75 void StopProvider() override; | 78 void StopProvider() override; |
| 76 void GetPosition(Geoposition* position) override; | 79 void GetPosition(Geoposition* position) override; |
| 77 void RequestRefresh() override; | |
| 78 void OnPermissionGranted() override; | 80 void OnPermissionGranted() override; |
| 79 | 81 |
| 80 private: | 82 private: |
| 81 // Satisfies a position request from cache or network. | 83 // Satisfies a position request from cache or network. |
| 82 void RequestPosition(); | 84 void RequestPosition(); |
| 83 | 85 |
| 84 // Gets called when new wifi data is available. | 86 // Gets called when new wifi data is available. |
| 85 void OnWifiDataUpdate(); | 87 void OnWifiDataUpdate(); |
| 86 | 88 |
| 87 // Internal helper used by OnWifiDataUpdate. | 89 // Internal helper used by OnWifiDataUpdate. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 // over the platform-dependent implementations. | 137 // over the platform-dependent implementations. |
| 136 DEVICE_GEOLOCATION_EXPORT LocationProviderBase* NewNetworkLocationProvider( | 138 DEVICE_GEOLOCATION_EXPORT LocationProviderBase* NewNetworkLocationProvider( |
| 137 const scoped_refptr<AccessTokenStore>& access_token_store, | 139 const scoped_refptr<AccessTokenStore>& access_token_store, |
| 138 const scoped_refptr<net::URLRequestContextGetter>& context, | 140 const scoped_refptr<net::URLRequestContextGetter>& context, |
| 139 const GURL& url, | 141 const GURL& url, |
| 140 const base::string16& access_token); | 142 const base::string16& access_token); |
| 141 | 143 |
| 142 } // namespace device | 144 } // namespace device |
| 143 | 145 |
| 144 #endif // DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ | 146 #endif // DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ |
| OLD | NEW |