diff options
author | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-15 16:24:45 +0000 |
---|---|---|
committer | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-15 16:24:45 +0000 |
commit | d085401e5e61569b0a73f236bab26cb6aeeeeac2 (patch) | |
tree | 9458bf4f914e72f1766dda4356403e4f271f7f95 /chrome/browser/geolocation/geolocation_dispatcher_host.cc | |
parent | 86272b73e152161cb64647490810e5c2c54f59da (diff) | |
download | chromium_src-d085401e5e61569b0a73f236bab26cb6aeeeeac2.zip chromium_src-d085401e5e61569b0a73f236bab26cb6aeeeeac2.tar.gz chromium_src-d085401e5e61569b0a73f236bab26cb6aeeeeac2.tar.bz2 |
Adds host for Geolocation OnStartUpdating.
This change blocks https://bugs.webkit.org/show_bug.cgi?id=36012
A follow-up will:
+ Remove the overloaded method (once WebKit lands).
+ Actually use the host.
Review URL: http://codereview.chromium.org/848003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41591 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/geolocation/geolocation_dispatcher_host.cc')
-rw-r--r-- | chrome/browser/geolocation/geolocation_dispatcher_host.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/geolocation/geolocation_dispatcher_host.cc b/chrome/browser/geolocation/geolocation_dispatcher_host.cc index 72b9aa2..0e2ac79 100644 --- a/chrome/browser/geolocation/geolocation_dispatcher_host.cc +++ b/chrome/browser/geolocation/geolocation_dispatcher_host.cc @@ -96,12 +96,17 @@ void GeolocationDispatcherHost::OnRequestPermission( } void GeolocationDispatcherHost::OnStartUpdating( - int render_view_id, int bridge_id, bool high_accuracy) { + int render_view_id, int bridge_id, const std::string& host, + bool enable_high_accuracy) { + // WebKit sends the startupdating request before checking permissions, to + // optimize the no-location-available case. + // TODO(bulach): Use host parameter to short-circuit the latched + // permission-denied case, and so avoid starting up location arbitrator. LOG(INFO) << "start updating" << render_view_id; if (!location_arbitrator_) location_arbitrator_ = GeolocationArbitrator::GetInstance(); location_arbitrator_->AddObserver( - this, GeolocationArbitrator::UpdateOptions(high_accuracy)); + this, GeolocationArbitrator::UpdateOptions(enable_high_accuracy)); } void GeolocationDispatcherHost::OnStopUpdating( |