Chromium Code Reviews| Index: device/geolocation/location_arbitrator_impl.h |
| diff --git a/device/geolocation/location_arbitrator_impl.h b/device/geolocation/location_arbitrator_impl.h |
| index f21fb9990a15d167a39b4531db4436efe4c645dd..1867c076c9f3b1971401fe00050bec56748ff3c3 100644 |
| --- a/device/geolocation/location_arbitrator_impl.h |
| +++ b/device/geolocation/location_arbitrator_impl.h |
| @@ -6,6 +6,7 @@ |
| #define DEVICE_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_ |
| #include <stdint.h> |
| +#include <memory> |
| #include <vector> |
| #include "base/callback_forward.h" |
| @@ -18,7 +19,6 @@ |
| #include "device/geolocation/geolocation_export.h" |
| #include "device/geolocation/geolocation_provider.h" |
| #include "device/geolocation/geoposition.h" |
| -#include "device/geolocation/location_arbitrator.h" |
| #include "device/geolocation/location_provider.h" |
| #include "net/url_request/url_request_context_getter.h" |
| @@ -35,7 +35,7 @@ class LocationProvider; |
| // providers and resolving them to a single 'best' location fix at any given |
| // moment. |
| class DEVICE_GEOLOCATION_EXPORT LocationArbitratorImpl |
| - : public LocationArbitrator { |
| + : public LocationProvider { |
| public: |
| // Number of milliseconds newer a location provider has to be that it's worth |
| // switching to this location provider on the basis of it being fresher |
| @@ -50,11 +50,15 @@ class DEVICE_GEOLOCATION_EXPORT LocationArbitratorImpl |
| static GURL DefaultNetworkProviderURL(); |
| - // LocationArbitrator |
| - void StartProviders(bool enable_high_accuracy) override; |
| - void StopProviders() override; |
| + // LocationProvider implementation. |
| + void SetUpdateCallback( |
| + const LocationProviderUpdateCallback& callback) override; |
| + bool StartProvider(bool enable_high_accuracy) override; |
| + void StopProvider() override; |
| + void GetPosition(Geoposition* position) override; |
| void OnPermissionGranted() override; |
| - bool HasPermissionBeenGranted() const override; |
| + |
| + bool HasPermissionBeenGrantedForTest() const; |
|
Kevin M
2016/08/15 19:12:46
Move above "LocationProvider implementation"
CJ
2016/08/15 20:11:51
Done.
|
| protected: |
| // These functions are useful for injection of dependencies in derived |
| @@ -81,7 +85,7 @@ class DEVICE_GEOLOCATION_EXPORT LocationArbitratorImpl |
| void OnAccessTokenStoresLoaded( |
| AccessTokenStore::AccessTokenMap access_token_map, |
| const scoped_refptr<net::URLRequestContextGetter>& context_getter); |
| - void DoStartProviders(); |
| + bool DoStartProviders(); |
| // Gets called when a provider has a new position. |
| void OnLocationUpdate(const LocationProvider* provider, |