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

Unified Diff: device/geolocation/location_arbitrator.h

Issue 2249283003: Hooks together Geolocation Feature in the Client and Engine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lai
Patch Set: Put TestingLocationArbitrator out of anonymous namespace. Created 4 years, 3 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
« no previous file with comments | « device/geolocation/geolocation_provider_impl.cc ('k') | device/geolocation/location_arbitrator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/geolocation/location_arbitrator.h
diff --git a/device/geolocation/location_arbitrator_impl.h b/device/geolocation/location_arbitrator.h
similarity index 90%
rename from device/geolocation/location_arbitrator_impl.h
rename to device/geolocation/location_arbitrator.h
index aa8e92ebd0dec2f9d9efb23d9bacb7cebdf73651..dca5dbe26b24ab4ece97c17c675e33067668b71e 100644
--- a/device/geolocation/location_arbitrator_impl.h
+++ b/device/geolocation/location_arbitrator.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef DEVICE_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_
-#define DEVICE_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_
+#ifndef DEVICE_GEOLOCATION_LOCATION_ARBITRATOR_H_
+#define DEVICE_GEOLOCATION_LOCATION_ARBITRATOR_H_
#include <stdint.h>
#include <memory>
@@ -34,16 +34,15 @@ class LocationProvider;
// This class is responsible for handling updates from multiple underlying
// providers and resolving them to a single 'best' location fix at any given
// moment.
-class DEVICE_GEOLOCATION_EXPORT LocationArbitratorImpl
- : public LocationProvider {
+class DEVICE_GEOLOCATION_EXPORT 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
// (regardles of relative accuracy). Public for tests.
static const int64_t kFixStaleTimeoutMilliseconds;
- explicit LocationArbitratorImpl(GeolocationDelegate* delegate);
- ~LocationArbitratorImpl() override;
+ explicit LocationArbitrator(std::unique_ptr<GeolocationDelegate> delegate);
+ ~LocationArbitrator() override;
static GURL DefaultNetworkProviderURL();
bool HasPermissionBeenGrantedForTest() const;
@@ -94,7 +93,7 @@ class DEVICE_GEOLOCATION_EXPORT LocationArbitratorImpl
const Geoposition& new_position,
bool from_same_provider) const;
- GeolocationDelegate* delegate_;
+ std::unique_ptr<GeolocationDelegate> delegate_;
scoped_refptr<AccessTokenStore> access_token_store_;
LocationProvider::LocationProviderUpdateCallback arbitrator_update_callback_;
@@ -116,7 +115,7 @@ class DEVICE_GEOLOCATION_EXPORT LocationArbitratorImpl
// Tracks whether providers should be running.
bool is_running_;
- DISALLOW_COPY_AND_ASSIGN(LocationArbitratorImpl);
+ DISALLOW_COPY_AND_ASSIGN(LocationArbitrator);
};
// Factory functions for the various types of location provider to abstract
@@ -125,4 +124,4 @@ std::unique_ptr<LocationProvider> NewSystemLocationProvider();
} // namespace device
-#endif // DEVICE_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_
+#endif // DEVICE_GEOLOCATION_LOCATION_ARBITRATOR_H_
« no previous file with comments | « device/geolocation/geolocation_provider_impl.cc ('k') | device/geolocation/location_arbitrator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698