Index: blimp/client/core/geolocation/geolocation_feature.cc |
diff --git a/blimp/client/core/geolocation/geolocation_feature.cc b/blimp/client/core/geolocation/geolocation_feature.cc |
index 201a9a0eca4a9037471cda4692ad8a023a8ed837..eee30a65349f059a29015ae84f535e9aca4e2d73 100644 |
--- a/blimp/client/core/geolocation/geolocation_feature.cc |
+++ b/blimp/client/core/geolocation/geolocation_feature.cc |
@@ -143,11 +143,11 @@ void GeolocationFeature::SendGeolocationErrorMessage( |
void GeolocationFeature::OnSendComplete(int result) { |
am_sending_message_ = false; |
- if (need_to_send_message_) { |
- need_to_send_message_ = false; |
- OnLocationUpdate(location_provider_.get(), |
- location_provider_->GetPosition()); |
+ device::Geoposition new_position = location_provider_->GetPosition(); |
+ if (need_to_send_message_ && new_position.Validate()) { |
Wez
2016/09/13 20:26:08
Hmmm, actually isn't Validate() a proxy for whethe
CJ
2016/09/13 22:45:22
It has to be this way because even if the Location
Wez
2016/09/16 01:20:27
But will we see an OnSendComplete() in that case?
CJ
2016/09/16 18:27:12
There's that race case. A Stop message gets receiv
|
+ OnLocationUpdate(location_provider_.get(), new_position); |
} |
+ need_to_send_message_ = false; |
} |
} // namespace client |