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

Unified Diff: services/shell/public/cpp/lib/connection_impl.cc

Issue 2215133002: Change signature of OnConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: . Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/shell/public/cpp/lib/connection_impl.h ('k') | services/shell/public/cpp/lib/connector_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/cpp/lib/connection_impl.cc
diff --git a/services/shell/public/cpp/lib/connection_impl.cc b/services/shell/public/cpp/lib/connection_impl.cc
index 9fa299503594032348735f042f8328e2c4bba176..870727c56f9862ef85fa4d22453a2d4299e18e4c 100644
--- a/services/shell/public/cpp/lib/connection_impl.cc
+++ b/services/shell/public/cpp/lib/connection_impl.cc
@@ -20,29 +20,16 @@ namespace internal {
// ConnectionImpl, public:
ConnectionImpl::ConnectionImpl()
- : allow_all_interfaces_(true),
- weak_factory_(this) {}
+ : weak_factory_(this) {}
-ConnectionImpl::ConnectionImpl(
- const Identity& remote,
- const CapabilityRequest& capability_request,
- State initial_state)
+ConnectionImpl::ConnectionImpl(const Identity& remote, State initial_state)
: remote_(remote),
state_(initial_state),
- capability_request_(capability_request),
- allow_all_interfaces_(capability_request.interfaces.size() == 1 &&
- capability_request.interfaces.count("*") == 1),
weak_factory_(this) {
}
ConnectionImpl::~ConnectionImpl() {}
-void ConnectionImpl::SetExposedInterfaces(
- std::unique_ptr<InterfaceRegistry> exposed_interfaces) {
- exposed_interfaces_owner_ = std::move(exposed_interfaces);
- set_exposed_interfaces(exposed_interfaces_owner_.get());
-}
-
void ConnectionImpl::SetRemoteInterfaces(
std::unique_ptr<InterfaceProvider> remote_interfaces) {
remote_interfaces_owner_ = std::move(remote_interfaces);
@@ -57,19 +44,12 @@ shell::mojom::Connector::ConnectCallback ConnectionImpl::GetConnectCallback() {
////////////////////////////////////////////////////////////////////////////////
// ConnectionImpl, Connection implementation:
-bool ConnectionImpl::HasCapabilityClass(const std::string& class_name) const {
- return capability_request_.classes.count(class_name) > 0;
-}
-
const Identity& ConnectionImpl::GetRemoteIdentity() const {
return remote_;
}
void ConnectionImpl::SetConnectionLostClosure(const base::Closure& handler) {
- if (remote_interfaces_)
- remote_interfaces_->SetConnectionLostClosure(handler);
- else
- exposed_interfaces_->SetConnectionLostClosure(handler);
+ remote_interfaces_->SetConnectionLostClosure(handler);
}
shell::mojom::ConnectResult ConnectionImpl::GetResult() const {
@@ -88,15 +68,6 @@ void ConnectionImpl::AddConnectionCompletedClosure(
callback.Run();
}
-bool ConnectionImpl::AllowsInterface(const std::string& interface_name) const {
- return allow_all_interfaces_ ||
- capability_request_.interfaces.count(interface_name);
-}
-
-InterfaceRegistry* ConnectionImpl::GetInterfaceRegistry() {
- return exposed_interfaces_;
-}
-
InterfaceProvider* ConnectionImpl::GetRemoteInterfaces() {
return remote_interfaces_;
}
« no previous file with comments | « services/shell/public/cpp/lib/connection_impl.h ('k') | services/shell/public/cpp/lib/connector_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698