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

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

Issue 2129313002: Geolocation cleanup: corrects uses of content::AccessTokenStore* and net::URLRequestContextGetter* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed StartTestStepFromClientThread() Created 4 years, 5 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/network_location_provider.h
diff --git a/content/browser/geolocation/network_location_provider.h b/content/browser/geolocation/network_location_provider.h
index 3381e522874c3c775e834e9de1f5d5f9833c9896..cef1ad161407d5d252fb886d7a4d65e8aeab8954 100644
--- a/content/browser/geolocation/network_location_provider.h
+++ b/content/browser/geolocation/network_location_provider.h
@@ -26,10 +26,8 @@
namespace content {
class AccessTokenStore;
-
-class NetworkLocationProvider
- : public base::NonThreadSafe,
- public LocationProviderBase {
+class NetworkLocationProvider : public base::NonThreadSafe,
+ public LocationProviderBase {
public:
// Cache of recently resolved locations. Public for tests.
class CONTENT_EXPORT PositionCache {
@@ -67,10 +65,11 @@ class NetworkLocationProvider
CacheAgeList cache_age_list_; // Oldest first.
};
- NetworkLocationProvider(AccessTokenStore* access_token_store,
- net::URLRequestContextGetter* context,
- const GURL& url,
- const base::string16& access_token);
+ NetworkLocationProvider(
+ const scoped_refptr<AccessTokenStore>& access_token_store,
+ const scoped_refptr<net::URLRequestContextGetter>& context,
+ const GURL& url,
+ const base::string16& access_token);
~NetworkLocationProvider() override;
// LocationProvider implementation
@@ -97,7 +96,7 @@ class NetworkLocationProvider
const base::string16& access_token,
const WifiData& wifi_data);
- scoped_refptr<AccessTokenStore> access_token_store_;
+ const scoped_refptr<AccessTokenStore> access_token_store_;
// The wifi data provider, acquired via global factories.
WifiDataProviderManager* wifi_data_provider_manager_;
@@ -127,7 +126,7 @@ class NetworkLocationProvider
std::unique_ptr<NetworkLocationRequest> request_;
// The cache of positions.
- std::unique_ptr<PositionCache> position_cache_;
+ const std::unique_ptr<PositionCache> position_cache_;
base::WeakPtrFactory<NetworkLocationProvider> weak_factory_;
@@ -137,8 +136,8 @@ class NetworkLocationProvider
// Factory functions for the various types of location provider to abstract
// over the platform-dependent implementations.
CONTENT_EXPORT LocationProviderBase* NewNetworkLocationProvider(
- AccessTokenStore* access_token_store,
- net::URLRequestContextGetter* context,
+ const scoped_refptr<AccessTokenStore>& access_token_store,
+ const scoped_refptr<net::URLRequestContextGetter>& context,
const GURL& url,
const base::string16& access_token);
« no previous file with comments | « content/browser/geolocation/location_provider_android.cc ('k') | content/browser/geolocation/network_location_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698