Index: device/geolocation/mock_location_provider.cc |
diff --git a/device/geolocation/mock_location_provider.cc b/device/geolocation/mock_location_provider.cc |
index 8190c5a2483530f7ba10bc79cdb679f60ee92d17..4a7714e98c4bf1f3fa17351f6f2a2c897f30d8c0 100644 |
--- a/device/geolocation/mock_location_provider.cc |
+++ b/device/geolocation/mock_location_provider.cc |
@@ -24,6 +24,10 @@ MockLocationProvider::MockLocationProvider() |
MockLocationProvider::~MockLocationProvider() {} |
+bool MockLocationProvider::IsProviderStarted() const { |
+ return state_ != STOPPED; |
+} |
+ |
void MockLocationProvider::HandlePositionChanged(const Geoposition& position) { |
if (provider_task_runner_->BelongsToCurrentThread()) { |
// The location arbitrator unit tests rely on this method running |
@@ -46,8 +50,8 @@ void MockLocationProvider::StopProvider() { |
state_ = STOPPED; |
} |
-void MockLocationProvider::GetPosition(Geoposition* position) { |
- *position = position_; |
+const Geoposition& MockLocationProvider::GetPosition() { |
+ return position_; |
} |
void MockLocationProvider::OnPermissionGranted() { |