Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(573)

Unified Diff: device/geolocation/network_location_provider.h

Issue 2298013002: Gets rid of LocationProviderBase. (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/geolocation/network_location_provider.h
diff --git a/device/geolocation/network_location_provider.h b/device/geolocation/network_location_provider.h
index 28bc21c5779e3549630b8bc1aa402424dbb707c1..f06c249f59a8b5a88a16b8a2fb0ad6046a9e89c9 100644
--- a/device/geolocation/network_location_provider.h
+++ b/device/geolocation/network_location_provider.h
@@ -19,7 +19,7 @@
#include "base/threading/thread.h"
#include "device/geolocation/geolocation_export.h"
#include "device/geolocation/geoposition.h"
-#include "device/geolocation/location_provider_base.h"
+#include "device/geolocation/location_provider.h"
#include "device/geolocation/network_location_request.h"
#include "device/geolocation/wifi_data_provider_manager.h"
@@ -27,7 +27,7 @@ namespace device {
class AccessTokenStore;
class NetworkLocationProvider : public base::NonThreadSafe,
- public LocationProviderBase {
+ public LocationProvider {
public:
// Cache of recently resolved locations. Public for tests.
class DEVICE_GEOLOCATION_EXPORT PositionCache {
@@ -71,6 +71,8 @@ class NetworkLocationProvider : public base::NonThreadSafe,
~NetworkLocationProvider() override;
// LocationProvider implementation
+ void SetUpdateCallback(
+ const LocationProviderUpdateCallback& callback) override;
bool StartProvider(bool high_accuracy) override;
void StopProvider() override;
const Geoposition& GetPosition() override;
@@ -114,6 +116,8 @@ class NetworkLocationProvider : public base::NonThreadSafe,
// The current best position estimate.
Geoposition position_;
+ LocationProvider::LocationProviderUpdateCallback callback_;
Michael van Ouwerkerk 2016/08/31 09:44:37 Rename this member to location_provider_update_cal
+
// Whether permission has been granted for the provider to operate.
bool is_permission_granted_;
@@ -132,7 +136,7 @@ class NetworkLocationProvider : public base::NonThreadSafe,
// Factory functions for the various types of location provider to abstract
// over the platform-dependent implementations.
-DEVICE_GEOLOCATION_EXPORT LocationProviderBase* NewNetworkLocationProvider(
+DEVICE_GEOLOCATION_EXPORT LocationProvider* NewNetworkLocationProvider(
const scoped_refptr<AccessTokenStore>& access_token_store,
const scoped_refptr<net::URLRequestContextGetter>& context,
const GURL& url,

Powered by Google App Engine
This is Rietveld 408576698