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

Unified Diff: services/shell/connect_util.h

Issue 2419723002: Move services/shell to services/service_manager (Closed)
Patch Set: rebase Created 4 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
« no previous file with comments | « services/shell/connect_params.cc ('k') | services/shell/connect_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/connect_util.h
diff --git a/services/shell/connect_util.h b/services/shell/connect_util.h
deleted file mode 100644
index 0524016d4e751ba4077ef364d796376ed3e9bfef..0000000000000000000000000000000000000000
--- a/services/shell/connect_util.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SERVICES_SHELL_CONNECT_UTIL_H_
-#define SERVICES_SHELL_CONNECT_UTIL_H_
-
-#include "mojo/public/cpp/bindings/interface_ptr.h"
-#include "mojo/public/cpp/system/handle.h"
-#include "services/shell/public/cpp/identity.h"
-#include "services/shell/public/interfaces/connector.mojom.h"
-
-namespace shell {
-
-class ServiceManager;
-
-mojo::ScopedMessagePipeHandle ConnectToInterfaceByName(
- ServiceManager* service_manager,
- const Identity& source,
- const Identity& target,
- const std::string& interface_name);
-
-// Must only be used by Service Manager internals and test code as it does not
-// forward capability filters. Runs |name| with a permissive capability filter.
-template <typename Interface>
-inline void ConnectToInterface(ServiceManager* service_manager,
- const Identity& source,
- const Identity& target,
- mojo::InterfacePtr<Interface>* ptr) {
- mojo::ScopedMessagePipeHandle service_handle =
- ConnectToInterfaceByName(service_manager, source, target,
- Interface::Name_);
- ptr->Bind(mojo::InterfacePtrInfo<Interface>(std::move(service_handle), 0u));
-}
-
-template <typename Interface>
-inline void ConnectToInterface(ServiceManager* service_manager,
- const Identity& source,
- const std::string& name,
- mojo::InterfacePtr<Interface>* ptr) {
- mojo::ScopedMessagePipeHandle service_handle = ConnectToInterfaceByName(
- service_manager, source, Identity(name, mojom::kInheritUserID),
- Interface::Name_);
- ptr->Bind(mojo::InterfacePtrInfo<Interface>(std::move(service_handle), 0u));
-}
-
-} // namespace shell
-
-#endif // SERVICES_SHELL_CONNECT_UTIL_H_
« no previous file with comments | « services/shell/connect_params.cc ('k') | services/shell/connect_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698