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

Side by Side Diff: content/browser/permissions/permission_service_impl.cc

Issue 1262613005: Remove interface_impl.h and error_handler.h usage from chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/permissions/permission_service_impl.h" 5 #include "content/browser/permissions/permission_service_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/public/browser/browser_context.h" 8 #include "content/public/browser/browser_context.h"
9 #include "content/public/browser/permission_manager.h" 9 #include "content/public/browser/permission_manager.h"
10 #include "content/public/browser/permission_type.h" 10 #include "content/public/browser/permission_type.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 if (!callback.is_null()) 61 if (!callback.is_null())
62 callback.Run(PERMISSION_STATUS_ASK); 62 callback.Run(PERMISSION_STATUS_ASK);
63 } 63 }
64 64
65 PermissionServiceImpl::PermissionServiceImpl( 65 PermissionServiceImpl::PermissionServiceImpl(
66 PermissionServiceContext* context, 66 PermissionServiceContext* context,
67 mojo::InterfaceRequest<PermissionService> request) 67 mojo::InterfaceRequest<PermissionService> request)
68 : context_(context), 68 : context_(context),
69 binding_(this, request.Pass()), 69 binding_(this, request.Pass()),
70 weak_factory_(this) { 70 weak_factory_(this) {
71 binding_.set_connection_error_handler(
72 base::Bind(&PermissionServiceImpl::OnConnectionError,
73 base::Unretained(this)));
71 } 74 }
72 75
73 PermissionServiceImpl::~PermissionServiceImpl() { 76 PermissionServiceImpl::~PermissionServiceImpl() {
74 DCHECK(pending_requests_.IsEmpty()); 77 DCHECK(pending_requests_.IsEmpty());
75 } 78 }
76 79
77 void PermissionServiceImpl::OnConnectionError() { 80 void PermissionServiceImpl::OnConnectionError() {
78 context_->ServiceHadConnectionError(this); 81 context_->ServiceHadConnectionError(this);
79 // After that call, |this| will be deleted. 82 // After that call, |this| will be deleted.
80 } 83 }
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 281
279 PermissionStatusCallback callback = subscription->callback; 282 PermissionStatusCallback callback = subscription->callback;
280 283
281 subscription->callback.reset(); 284 subscription->callback.reset();
282 pending_subscriptions_.Remove(pending_subscription_id); 285 pending_subscriptions_.Remove(pending_subscription_id);
283 286
284 callback.Run(status); 287 callback.Run(status);
285 } 288 }
286 289
287 } // namespace content 290 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/permissions/permission_service_impl.h ('k') | content/common/mojo/service_registry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698