Index: content/browser/geolocation/geolocation_provider.cc |
diff --git a/content/browser/geolocation/geolocation_provider.cc b/content/browser/geolocation/geolocation_provider.cc |
index 30218af9dc1d9437fceaa01d44a404af65842756..80420b9cca360660b16d5aaec76d92630b3fad7f 100644 |
--- a/content/browser/geolocation/geolocation_provider.cc |
+++ b/content/browser/geolocation/geolocation_provider.cc |
@@ -103,6 +103,9 @@ void GeolocationProvider::OnClientsChanged() { |
base::Closure task; |
if (observers_.empty() && callbacks_.empty()) { |
DCHECK(IsRunning()); |
+ // We have no more observers, so we clear the cached geoposition so that |
+ // when the next observer is added we will not provide a stale position. |
+ position_ = Geoposition(); |
task = base::Bind(&GeolocationProvider::StopProviders, |
base::Unretained(this)); |
} else { |