summaryrefslogtreecommitdiffstats
path: root/content/browser/geolocation/location_arbitrator_impl.cc
diff options
context:
space:
mode:
authorrobliao@chromium.org <robliao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-04 11:02:22 +0000
committerrobliao@chromium.org <robliao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-04 11:02:22 +0000
commitb056392f4543b7b414c471f75f7e9011463c18a2 (patch)
tree472dca864cf59ba3136ef0d87f86d921a887e24c /content/browser/geolocation/location_arbitrator_impl.cc
parent45dde4b70730581b15801fb9fb43df5ca078b6bc (diff)
downloadchromium_src-b056392f4543b7b414c471f75f7e9011463c18a2.zip
chromium_src-b056392f4543b7b414c471f75f7e9011463c18a2.tar.gz
chromium_src-b056392f4543b7b414c471f75f7e9011463c18a2.tar.bz2
Clear Reference Location State When Providers are Stopped
The location arbitrator relies on pointer comparisons to identify which location provider provided a reported location. Now, we clear this state when the providers are shut down. This prevents a bug where a stale location prevented the arbitrator from updating its clients with a newer location. BUG=240956 Review URL: https://chromiumcodereview.appspot.com/15968009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203924 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/geolocation/location_arbitrator_impl.cc')
-rw-r--r--content/browser/geolocation/location_arbitrator_impl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/content/browser/geolocation/location_arbitrator_impl.cc b/content/browser/geolocation/location_arbitrator_impl.cc
index 8bc9a60..82206fb 100644
--- a/content/browser/geolocation/location_arbitrator_impl.cc
+++ b/content/browser/geolocation/location_arbitrator_impl.cc
@@ -70,6 +70,12 @@ void GeolocationArbitratorImpl::DoStartProviders() {
}
void GeolocationArbitratorImpl::StopProviders() {
+ // Reset the reference location state (provider+position)
+ // so that future starts use fresh locations from
+ // the newly constructed providers.
+ position_provider_ = NULL;
+ position_ = Geoposition();
+
providers_.clear();
is_running_ = false;
}