Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(834)

Unified Diff: content/browser/geolocation/geolocation_dispatcher_host.cc

Issue 356543003: Audit the last usage of Geolocation and Notification permissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Jam nits. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 ad1f2fcc4441f138726f67d6f0e8e049302e5962..75abab5a527f91a45d2a76a3a7ee64b39e79c7dd 100644
--- a/content/browser/geolocation/geolocation_dispatcher_host.cc
+++ b/content/browser/geolocation/geolocation_dispatcher_host.cc
@@ -130,6 +130,15 @@ void GeolocationDispatcherHost::OnLocationUpdate(
for (std::map<RenderFrameHost*, bool>::iterator i = updating_frames_.begin();
i != updating_frames_.end(); ++i) {
+ RenderFrameHost* top_frame = i->first;
+ while (top_frame->GetParent()) {
+ top_frame = top_frame->GetParent();
+ }
+ GetContentClient()->browser()->DidUseGeolocationPermission(
+ web_contents(),
+ i->first->GetLastCommittedURL().GetOrigin(),
+ top_frame->GetLastCommittedURL().GetOrigin());
+
i->first->Send(new GeolocationMsg_PositionUpdated(
i->first->GetRoutingID(), geoposition));
}

Powered by Google App Engine
This is Rietveld 408576698