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

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

Issue 459953002: Migrate geolocation permissions to the new common permission class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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 75abab5a527f91a45d2a76a3a7ee64b39e79c7dd..a778dfab2a3092096f9f43514f2c7b0d1475139d 100644
--- a/content/browser/geolocation/geolocation_dispatcher_host.cc
+++ b/content/browser/geolocation/geolocation_dispatcher_host.cc
@@ -163,8 +163,7 @@ void GeolocationDispatcherHost::OnRequestPermission(
user_gesture,
base::Bind(&GeolocationDispatcherHost::SendGeolocationPermissionResponse,
weak_factory_.GetWeakPtr(),
- render_process_id, render_frame_id, bridge_id),
- &pending_permissions_.back().cancel);
+ render_process_id, render_frame_id, bridge_id));
}
void GeolocationDispatcherHost::OnCancelPermissionRequest(
@@ -177,8 +176,9 @@ void GeolocationDispatcherHost::OnCancelPermissionRequest(
if (pending_permissions_[i].render_process_id == render_process_id &&
pending_permissions_[i].render_frame_id == render_frame_id &&
pending_permissions_[i].bridge_id == bridge_id) {
- if (!pending_permissions_[i].cancel.is_null())
- pending_permissions_[i].cancel.Run();
+ GetContentClient()->browser()->CancelGeolocationPermissionRequest(
+ web_contents(), bridge_id, requesting_frame);
+
pending_permissions_.erase(pending_permissions_.begin() + i);
return;
}

Powered by Google App Engine
This is Rietveld 408576698