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

Unified Diff: content/browser/geolocation/location_arbitrator_impl.h

Issue 2098553002: Geolocation: extract ContentBrowserClient methods specific to Geolocation into a class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a TODO Created 4 years, 6 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: content/browser/geolocation/location_arbitrator_impl.h
diff --git a/content/browser/geolocation/location_arbitrator_impl.h b/content/browser/geolocation/location_arbitrator_impl.h
index 54ce5a710edb67a7651b09a9a54dd7842a54ba9c..f476522400fdbe4d306b92c7e7b6875c3e788298 100644
--- a/content/browser/geolocation/location_arbitrator_impl.h
+++ b/content/browser/geolocation/location_arbitrator_impl.h
@@ -17,6 +17,7 @@
#include "content/browser/geolocation/location_arbitrator.h"
#include "content/common/content_export.h"
#include "content/public/browser/access_token_store.h"
+#include "content/public/browser/geolocation_provider.h"
#include "content/public/browser/location_provider.h"
#include "content/public/common/geoposition.h"
#include "net/url_request/url_request_context_getter.h"
@@ -41,7 +42,8 @@ class CONTENT_EXPORT LocationArbitratorImpl : public LocationArbitrator {
typedef base::Callback<void(const Geoposition&)> LocationUpdateCallback;
- explicit LocationArbitratorImpl(const LocationUpdateCallback& callback);
+ LocationArbitratorImpl(const LocationUpdateCallback& callback,
+ GeolocationProvider::Delegate* delegate);
~LocationArbitratorImpl() override;
static GURL DefaultNetworkProviderURL();
@@ -66,6 +68,8 @@ class CONTENT_EXPORT LocationArbitratorImpl : public LocationArbitrator {
virtual std::unique_ptr<LocationProvider> NewSystemLocationProvider();
virtual base::Time GetTimeNow() const;
+ GeolocationProvider::Delegate* GetDelegateForTesting() { return delegate_; }
+
private:
// Provider will either be added to |providers_| or
// deleted on error (e.g. it fails to start).
@@ -88,6 +92,8 @@ class CONTENT_EXPORT LocationArbitratorImpl : public LocationArbitrator {
const Geoposition& new_position,
bool from_same_provider) const;
+ GeolocationProvider::Delegate* delegate_;
+
scoped_refptr<AccessTokenStore> access_token_store_;
LocationUpdateCallback arbitrator_update_callback_;
LocationProvider::LocationProviderUpdateCallback provider_update_callback_;
« no previous file with comments | « content/browser/geolocation/geolocation_provider_impl.cc ('k') | content/browser/geolocation/location_arbitrator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698