opt into location service on main thread
This commit is contained in:
parent
d29c27dc78
commit
ee80313666
2 changed files with 4 additions and 2 deletions
|
@ -54,7 +54,6 @@ class GeoURLRequestContextGetter : public net::URLRequestContextGetter {
|
|||
|
||||
AtomAccessTokenStore::AtomAccessTokenStore()
|
||||
: request_context_getter_(new internal::GeoURLRequestContextGetter) {
|
||||
device::GeolocationProvider::GetInstance()->UserDidOptIntoLocationServices();
|
||||
}
|
||||
|
||||
AtomAccessTokenStore::~AtomAccessTokenStore() {
|
||||
|
|
|
@ -39,7 +39,10 @@ namespace {
|
|||
// A provider of Geolocation services to override AccessTokenStore.
|
||||
class AtomGeolocationDelegate : public device::GeolocationDelegate {
|
||||
public:
|
||||
AtomGeolocationDelegate() = default;
|
||||
AtomGeolocationDelegate() {
|
||||
device::GeolocationProvider::GetInstance()
|
||||
->UserDidOptIntoLocationServices();
|
||||
}
|
||||
|
||||
scoped_refptr<device::AccessTokenStore> CreateAccessTokenStore() final {
|
||||
return new AtomAccessTokenStore();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue