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

Side by Side Diff: device/geolocation/network_location_provider.h

Issue 2226143002: Gets rid of the LocationArbitrator interface, in preference for LocationProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into lai 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ 5 #ifndef DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_
6 #define DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ 6 #define DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 NetworkLocationProvider( 66 NetworkLocationProvider(
67 const scoped_refptr<AccessTokenStore>& access_token_store, 67 const scoped_refptr<AccessTokenStore>& access_token_store,
68 const scoped_refptr<net::URLRequestContextGetter>& context, 68 const scoped_refptr<net::URLRequestContextGetter>& context,
69 const GURL& url, 69 const GURL& url,
70 const base::string16& access_token); 70 const base::string16& access_token);
71 ~NetworkLocationProvider() override; 71 ~NetworkLocationProvider() override;
72 72
73 // LocationProvider implementation 73 // LocationProvider implementation
74 bool StartProvider(bool high_accuracy) override; 74 bool StartProvider(bool high_accuracy) override;
75 void StopProvider() override; 75 void StopProvider() override;
76 void GetPosition(Geoposition* position) override; 76 const Geoposition& GetPosition() override;
77 void RequestRefresh() override;
78 void OnPermissionGranted() override; 77 void OnPermissionGranted() override;
79 78
80 private: 79 private:
80 // Provides a hint to the provider that new location data is needed as soon
81 // as possible.
82 void RequestRefresh();
Wez 2016/08/19 01:33:12 This comment implies that external callers provide
CJ 2016/08/22 17:41:31 Done. Which tests are you talking about? (Not seei
Wez 2016/08/24 04:13:17 All that RequestRefresh() does is: if (!weak_f
CJ 2016/08/24 21:32:05 Doesnt seem to.
83
81 // Satisfies a position request from cache or network. 84 // Satisfies a position request from cache or network.
82 void RequestPosition(); 85 void RequestPosition();
83 86
84 // Gets called when new wifi data is available. 87 // Gets called when new wifi data is available.
85 void OnWifiDataUpdate(); 88 void OnWifiDataUpdate();
86 89
87 // Internal helper used by OnWifiDataUpdate. 90 // Internal helper used by OnWifiDataUpdate.
88 void OnWifiDataUpdated(); 91 void OnWifiDataUpdated();
89 92
90 bool IsStarted() const; 93 bool IsStarted() const;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // over the platform-dependent implementations. 138 // over the platform-dependent implementations.
136 DEVICE_GEOLOCATION_EXPORT LocationProviderBase* NewNetworkLocationProvider( 139 DEVICE_GEOLOCATION_EXPORT LocationProviderBase* NewNetworkLocationProvider(
137 const scoped_refptr<AccessTokenStore>& access_token_store, 140 const scoped_refptr<AccessTokenStore>& access_token_store,
138 const scoped_refptr<net::URLRequestContextGetter>& context, 141 const scoped_refptr<net::URLRequestContextGetter>& context,
139 const GURL& url, 142 const GURL& url,
140 const base::string16& access_token); 143 const base::string16& access_token);
141 144
142 } // namespace device 145 } // namespace device
143 146
144 #endif // DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ 147 #endif // DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698