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

Unified Diff: content/browser/permissions/permission_service_impl.cc

Issue 1513973002: PermissionServiceContext using mojo::StrongBindingSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-geolocation-untangle
Patch Set: Created 5 years 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
« no previous file with comments | « content/browser/permissions/permission_service_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/permissions/permission_service_impl.cc
diff --git a/content/browser/permissions/permission_service_impl.cc b/content/browser/permissions/permission_service_impl.cc
index 32c7c3a361697f45d322b8fd6e5f73d31e176f17..6d4710dd738f9d894b683439d9dfe6627719db41 100644
--- a/content/browser/permissions/permission_service_impl.cc
+++ b/content/browser/permissions/permission_service_impl.cc
@@ -5,6 +5,7 @@
#include "content/browser/permissions/permission_service_impl.h"
#include "base/bind.h"
+#include "content/browser/permissions/permission_service_context.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/permission_manager.h"
#include "content/public/browser/permission_type.h"
@@ -83,26 +84,14 @@ PermissionServiceImpl::PendingSubscription::~PendingSubscription() {
callback.Run(PERMISSION_STATUS_ASK);
}
-PermissionServiceImpl::PermissionServiceImpl(
- PermissionServiceContext* context,
- mojo::InterfaceRequest<PermissionService> request)
- : context_(context),
- binding_(this, request.Pass()),
- weak_factory_(this) {
- binding_.set_connection_error_handler(
- base::Bind(&PermissionServiceImpl::OnConnectionError,
- base::Unretained(this)));
+PermissionServiceImpl::PermissionServiceImpl(PermissionServiceContext* context)
+ : context_(context), weak_factory_(this) {
}
PermissionServiceImpl::~PermissionServiceImpl() {
DCHECK(pending_requests_.IsEmpty());
}
-void PermissionServiceImpl::OnConnectionError() {
- context_->ServiceHadConnectionError(this);
- // After that call, |this| will be deleted.
-}
-
void PermissionServiceImpl::RequestPermission(
PermissionName permission,
const mojo::String& origin,
« no previous file with comments | « content/browser/permissions/permission_service_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698