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

Side by Side Diff: mojo/shell/connect_util.h

Issue 1719193003: Add a user id parameter to connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef MOJO_SHELL_CONNECT_UTIL_H_ 5 #ifndef MOJO_SHELL_CONNECT_UTIL_H_
6 #define MOJO_SHELL_CONNECT_UTIL_H_ 6 #define MOJO_SHELL_CONNECT_UTIL_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "mojo/public/cpp/bindings/interface_ptr.h" 10 #include "mojo/public/cpp/bindings/interface_ptr.h"
(...skipping 26 matching lines...) Expand all
37 ptr->Bind(InterfacePtrInfo<Interface>(std::move(service_handle), 0u)); 37 ptr->Bind(InterfacePtrInfo<Interface>(std::move(service_handle), 0u));
38 } 38 }
39 39
40 template <typename Interface> 40 template <typename Interface>
41 inline void ConnectToInterface(ApplicationManager* application_manager, 41 inline void ConnectToInterface(ApplicationManager* application_manager,
42 const Identity& source, 42 const Identity& source,
43 const GURL& application_url, 43 const GURL& application_url,
44 InterfacePtr<Interface>* ptr) { 44 InterfacePtr<Interface>* ptr) {
45 ScopedMessagePipeHandle service_handle = ConnectToInterfaceByName( 45 ScopedMessagePipeHandle service_handle = ConnectToInterfaceByName(
46 application_manager, source, 46 application_manager, source,
47 Identity(application_url, std::string(), GetPermissiveCapabilityFilter()), 47 Identity(application_url, std::string(), mojom::Shell::kUserInherit,
48 GetPermissiveCapabilityFilter()),
48 Interface::Name_); 49 Interface::Name_);
49 ptr->Bind(InterfacePtrInfo<Interface>(std::move(service_handle), 0u)); 50 ptr->Bind(InterfacePtrInfo<Interface>(std::move(service_handle), 0u));
50 } 51 }
51 52
52 } // namespace shell 53 } // namespace shell
53 } // namespace mojo 54 } // namespace mojo
54 55
55 56
56 #endif // MOJO_SHELL_CONNECT_UTIL_H_ 57 #endif // MOJO_SHELL_CONNECT_UTIL_H_
OLDNEW
« no previous file with comments | « mojo/shell/connect_params.cc ('k') | mojo/shell/identity.h » ('j') | mojo/shell/identity.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698