Index: device/geolocation/geolocation_service_impl.cc |
diff --git a/device/geolocation/geolocation_service_impl.cc b/device/geolocation/geolocation_service_impl.cc |
index 357d9cd9fcf1b2bc383f492ccef6eea16c7349c9..ebc145dc3a7790e2c1b0beab7d8d9461a820965f 100644 |
--- a/device/geolocation/geolocation_service_impl.cc |
+++ b/device/geolocation/geolocation_service_impl.cc |
@@ -118,14 +118,14 @@ void GeolocationServiceImpl::SetHighAccuracy(bool high_accuracy) { |
} |
void GeolocationServiceImpl::QueryNextPosition( |
- const QueryNextPositionCallback& callback) { |
+ QueryNextPositionCallback callback) { |
if (!position_callback_.is_null()) { |
DVLOG(1) << "Overlapped call to QueryNextPosition!"; |
OnConnectionError(); // Simulate a connection error. |
return; |
} |
- position_callback_ = callback; |
+ position_callback_ = std::move(callback); |
if (has_position_to_report_) |
ReportCurrentPosition(); |
@@ -178,8 +178,7 @@ void GeolocationServiceImpl::OnLocationUpdate(const Geoposition& position) { |
} |
void GeolocationServiceImpl::ReportCurrentPosition() { |
- position_callback_.Run(current_position_.Clone()); |
- position_callback_.Reset(); |
+ std::move(position_callback_).Run(current_position_.Clone()); |
has_position_to_report_ = false; |
} |