Chromium Code Reviews| Index: content/browser/geolocation/geolocation_provider_impl.cc |
| diff --git a/content/browser/geolocation/geolocation_provider_impl.cc b/content/browser/geolocation/geolocation_provider_impl.cc |
| index f3d6e37e062bf002b3b4050ab5c6cdb5e17a19e0..4cf212f3c7906a972ba6ecc2784e639e8aed202d 100644 |
| --- a/content/browser/geolocation/geolocation_provider_impl.cc |
| +++ b/content/browser/geolocation/geolocation_provider_impl.cc |
| @@ -14,6 +14,8 @@ |
| #include "base/single_thread_task_runner.h" |
| #include "content/browser/geolocation/location_arbitrator_impl.h" |
| #include "content/public/browser/browser_thread.h" |
| +#include "content/public/browser/browser_thread.h" |
|
Michael van Ouwerkerk
2016/06/24 13:57:18
nit: delete this duplicated include
mcasas
2016/06/24 19:25:52
Done.
|
| +#include "content/public/browser/content_browser_client.h" |
| namespace content { |
| @@ -174,7 +176,15 @@ std::unique_ptr<LocationArbitrator> |
| GeolocationProviderImpl::CreateArbitrator() { |
| LocationArbitratorImpl::LocationUpdateCallback callback = base::Bind( |
| &GeolocationProviderImpl::OnLocationUpdate, base::Unretained(this)); |
| - return base::WrapUnique(new LocationArbitratorImpl(callback)); |
| + |
| + // Use the embedder for service overrides or fall back to the default ones. |
| + GeolocationProvider::ServiceOverrides* service_overrides = |
| + GetContentClient()->browser()->GetGeolocationServiceOverrides(); |
| + if (!service_overrides) |
| + service_overrides = new GeolocationProvider::ServiceOverrides; |
| + |
| + return base::WrapUnique( |
| + new LocationArbitratorImpl(callback, service_overrides)); |
| } |
| } // namespace content |