| Index: content/browser/geolocation/geolocation_dispatcher_host.cc
|
| diff --git a/content/browser/geolocation/geolocation_dispatcher_host.cc b/content/browser/geolocation/geolocation_dispatcher_host.cc
|
| index 75abab5a527f91a45d2a76a3a7ee64b39e79c7dd..66ad502a0baca5652c1edd3cf6a74dda491607b8 100644
|
| --- a/content/browser/geolocation/geolocation_dispatcher_host.cc
|
| +++ b/content/browser/geolocation/geolocation_dispatcher_host.cc
|
| @@ -78,10 +78,10 @@ GeolocationDispatcherHost::PendingPermission::PendingPermission(
|
| GeolocationDispatcherHost::PendingPermission::~PendingPermission() {
|
| }
|
|
|
| -GeolocationDispatcherHost::GeolocationDispatcherHost(
|
| - WebContents* web_contents)
|
| +GeolocationDispatcherHost::GeolocationDispatcherHost(WebContents* web_contents)
|
| : WebContentsObserver(web_contents),
|
| paused_(false),
|
| + geolocationPrecision_(-1),
|
| weak_factory_(this) {
|
| // This is initialized by WebContentsImpl. Do not add any non-trivial
|
| // initialization here, defer to OnStartUpdating which is triggered whenever
|
| @@ -140,7 +140,8 @@ void GeolocationDispatcherHost::OnLocationUpdate(
|
| top_frame->GetLastCommittedURL().GetOrigin());
|
|
|
| i->first->Send(new GeolocationMsg_PositionUpdated(
|
| - i->first->GetRoutingID(), geoposition));
|
| + i->first->GetRoutingID(),
|
| + Geoposition::ApplyPrecision(geoposition, geolocationPrecision_)));
|
| }
|
| }
|
|
|
| @@ -238,6 +239,7 @@ void GeolocationDispatcherHost::SendGeolocationPermissionResponse(
|
| int render_process_id,
|
| int render_frame_id,
|
| int bridge_id,
|
| + int choice,
|
| bool allowed) {
|
| for (size_t i = 0; i < pending_permissions_.size(); ++i) {
|
| if (pending_permissions_[i].render_process_id == render_process_id &&
|
| @@ -251,6 +253,7 @@ void GeolocationDispatcherHost::SendGeolocationPermissionResponse(
|
| }
|
|
|
| if (allowed) {
|
| + geolocationPrecision_ = choice;
|
| GeolocationProviderImpl::GetInstance()->
|
| UserDidOptIntoLocationServices();
|
| }
|
|
|