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

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

Issue 622793002: Group the different permission related methods in the content api. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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 d7286d9b2dc0bbbedcdc89fe064a51da399175ae..d677ba038edce8f533f83444485801676b1d7bfa 100644
--- a/content/browser/geolocation/geolocation_dispatcher_host.cc
+++ b/content/browser/geolocation/geolocation_dispatcher_host.cc
@@ -165,7 +165,8 @@ void GeolocationDispatcherHost::UpdateGeoposition(
while (top_frame->GetParent()) {
top_frame = top_frame->GetParent();
}
- GetContentClient()->browser()->DidUseGeolocationPermission(
+ GetContentClient()->browser()->RegisterPermissionUsage(
+ content::PERMISSION_GEOLOCATION,
web_contents(),
frame->GetLastCommittedURL().GetOrigin(),
top_frame->GetLastCommittedURL().GetOrigin());
@@ -186,14 +187,17 @@ void GeolocationDispatcherHost::OnRequestPermission(
render_frame_id, render_process_id, bridge_id, requesting_origin);
pending_permissions_.push_back(pending_permission);
- GetContentClient()->browser()->RequestGeolocationPermission(
+ GetContentClient()->browser()->RequestPermission(
+ content::PERMISSION_GEOLOCATION,
web_contents(),
bridge_id,
requesting_origin,
user_gesture,
base::Bind(&GeolocationDispatcherHost::SendGeolocationPermissionResponse,
weak_factory_.GetWeakPtr(),
- render_process_id, render_frame_id, bridge_id));
+ render_process_id,
+ render_frame_id,
+ bridge_id));
}
void GeolocationDispatcherHost::OnStartUpdating(
@@ -286,7 +290,8 @@ void GeolocationDispatcherHost::CancelPermissionRequestsForFrame(
for (size_t i = 0; i < pending_permissions_.size(); ++i) {
if (pending_permissions_[i].render_process_id == render_process_id &&
pending_permissions_[i].render_frame_id == render_frame_id) {
- GetContentClient()->browser()->CancelGeolocationPermissionRequest(
+ GetContentClient()->browser()->CancelPermissionRequest(
+ content::PERMISSION_GEOLOCATION,
web_contents(),
pending_permissions_[i].bridge_id,
pending_permissions_[i].origin);

Powered by Google App Engine
This is Rietveld 408576698