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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1411063007: Add mojo::StrongBindingSet and use it in GeolocationServiceContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 0928d4dad34c09750e7bf5069ddfe10f2a28747c..f5b18bd941c631d1951e399e3053720774ba9053 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -1668,18 +1668,11 @@ void RenderFrameHostImpl::OnHidePopup() {
#endif
void RenderFrameHostImpl::RegisterMojoServices() {
- GeolocationServiceContext* geolocation_service_context =
- delegate_ ? delegate_->GetGeolocationServiceContext() : NULL;
- if (geolocation_service_context) {
- // TODO(creis): Bind process ID here so that GeolocationServiceImpl
- // can perform permissions checks once site isolation is complete.
- // crbug.com/426384
- GetServiceRegistry()->AddService<GeolocationService>(
- base::Bind(&GeolocationServiceContext::CreateService,
- base::Unretained(geolocation_service_context),
- base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission,
- base::Unretained(this))));
- }
+ // TODO(creis): Bind process ID here so that GeolocationServiceImpl
+ // can perform permissions checks once site isolation is complete.
+ // crbug.com/426384
+ GetServiceRegistry()->AddService(
+ base::Bind(&GeolocationServiceContext::CreateService, this));
WakeLockServiceContext* wake_lock_service_context =
delegate_ ? delegate_->GetWakeLockServiceContext() : nullptr;
@@ -2229,19 +2222,6 @@ void RenderFrameHostImpl::SendNavigateMessage(
routing_id_, common_params, start_params, request_params));
}
-void RenderFrameHostImpl::DidUseGeolocationPermission() {
- PermissionManager* permission_manager =
- GetSiteInstance()->GetBrowserContext()->GetPermissionManager();
- if (!permission_manager)
- return;
-
- permission_manager->RegisterPermissionUsage(
- PermissionType::GEOLOCATION,
- GetLastCommittedURL().GetOrigin(),
- frame_tree_node()->frame_tree()->GetMainFrame()
- ->GetLastCommittedURL().GetOrigin());
-}
-
void RenderFrameHostImpl::UpdatePermissionsForNavigation(
const CommonNavigationParams& common_params,
const RequestNavigationParams& request_params) {

Powered by Google App Engine
This is Rietveld 408576698