| Index: device/geolocation/fake_location_provider.cc
|
| diff --git a/device/geolocation/fake_location_provider.cc b/device/geolocation/fake_location_provider.cc
|
| index 18e25694bbc2652acee1c95db2e9fa5cae511967..14bc4d0fb9cca5c5b3b1e4581949b46449d8fb0a 100644
|
| --- a/device/geolocation/fake_location_provider.cc
|
| +++ b/device/geolocation/fake_location_provider.cc
|
| @@ -29,7 +29,8 @@ void FakeLocationProvider::HandlePositionChanged(const Geoposition& position) {
|
| // The location arbitrator unit tests rely on this method running
|
| // synchronously.
|
| position_ = position;
|
| - NotifyCallback(position_);
|
| + if (!callback_.is_null())
|
| + callback_.Run(this, position_);
|
| } else {
|
| provider_task_runner_->PostTask(
|
| FROM_HERE, base::Bind(&FakeLocationProvider::HandlePositionChanged,
|
| @@ -37,6 +38,11 @@ void FakeLocationProvider::HandlePositionChanged(const Geoposition& position) {
|
| }
|
| }
|
|
|
| +void FakeLocationProvider::SetUpdateCallback(
|
| + const LocationProviderUpdateCallback& callback) {
|
| + callback_ = callback;
|
| +}
|
| +
|
| bool FakeLocationProvider::StartProvider(bool high_accuracy) {
|
| state_ = high_accuracy ? HIGH_ACCURACY : LOW_ACCURACY;
|
| return true;
|
|
|