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

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

Issue 1307273004: Group ConnectToApplication-related info into a params struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « mojo/shell/application_manager_unittest.cc ('k') | mojo/shell/capability_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_CAPABILITY_FILTER_H_ 5 #ifndef MOJO_SHELL_CAPABILITY_FILTER_H_
6 #define MOJO_SHELL_CAPABILITY_FILTER_H_ 6 #define MOJO_SHELL_CAPABILITY_FILTER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
11 #include "mojo/public/cpp/bindings/array.h" 11 #include "mojo/public/cpp/bindings/array.h"
12 12
13 namespace mojo { 13 namespace mojo {
14 namespace shell { 14 namespace shell {
15 15
16 struct Identity;
17
16 // A set of names of interfaces that may be exposed to an application. 18 // A set of names of interfaces that may be exposed to an application.
17 using AllowedInterfaces = std::set<std::string>; 19 using AllowedInterfaces = std::set<std::string>;
18 // A map of allowed applications to allowed interface sets. See shell.mojom for 20 // A map of allowed applications to allowed interface sets. See shell.mojom for
19 // more details. 21 // more details.
20 using CapabilityFilter = std::map<std::string, AllowedInterfaces>; 22 using CapabilityFilter = std::map<std::string, AllowedInterfaces>;
21 23
22 // Returns a capability filter that allows an application to connect to any 24 // Returns a capability filter that allows an application to connect to any
23 // other application and any service exposed by other applications. 25 // other application and any service exposed by other applications.
24 CapabilityFilter GetPermissiveCapabilityFilter(); 26 CapabilityFilter GetPermissiveCapabilityFilter();
25 27
28 // Returns the set of interfaces that an application instance with |filter| is
29 // allowed to see from an instance with |identity|.
30 AllowedInterfaces GetAllowedInterfaces(const CapabilityFilter& filter,
31 const Identity& identity);
32
26 } // namespace shell 33 } // namespace shell
27 } // namespace mojo 34 } // namespace mojo
28 35
29 36
30 #endif // MOJO_SHELL_CAPABILITY_FILTER_H_ 37 #endif // MOJO_SHELL_CAPABILITY_FILTER_H_
OLDNEW
« no previous file with comments | « mojo/shell/application_manager_unittest.cc ('k') | mojo/shell/capability_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698