| OLD | NEW |
| 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_IDENTITY_H_ | 5 #ifndef MOJO_SHELL_IDENTITY_H_ |
| 6 #define MOJO_SHELL_IDENTITY_H_ | 6 #define MOJO_SHELL_IDENTITY_H_ |
| 7 | 7 |
| 8 #include "mojo/shell/capability_filter.h" | 8 #include "mojo/shell/capability_filter.h" |
| 9 #include "url/gurl.h" | 9 #include "url/gurl.h" |
| 10 | 10 |
| 11 namespace mojo { | 11 namespace mojo { |
| 12 namespace shell { | 12 namespace shell { |
| 13 | 13 |
| 14 // Represents the identity of an application. | 14 // Represents the identity of an application. |
| 15 // |url| is the URL of the application. | 15 // |url| is the URL of the application. |
| 16 // |qualifier| is a string that allows to tie a specific instance of an | 16 // |qualifier| is a string that allows to tie a specific instance of an |
| 17 // application to another. A typical use case of qualifier is to control process | 17 // application to another. A typical use case of qualifier is to control process |
| 18 // grouping for a given application URL. For example, the core services are | 18 // grouping for a given application URL. For example, the core services are |
| 19 // grouped into "Core"/"Files"/"Network"/etc. using qualifier; content handler's | 19 // grouped into "Core"/"Files"/"Network"/etc. using qualifier; content handler's |
| 20 // qualifier is derived from the origin of the content. | 20 // qualifier is derived from the origin of the content. |
| 21 class Identity { | 21 class Identity { |
| 22 public: | 22 public: |
| 23 Identity(); | 23 Identity(); |
| 24 // Assumes user = mojom::Shell::kUserRoot. | 24 // Assumes user = mojom::Connector::kUserRoot. |
| 25 // Used in tests or for shell-initiated connections. | 25 // Used in tests or for shell-initiated connections. |
| 26 explicit Identity(const GURL& in_url); | 26 explicit Identity(const GURL& in_url); |
| 27 Identity(const GURL& in_url, | 27 Identity(const GURL& in_url, |
| 28 const std::string& in_qualifier, | 28 const std::string& in_qualifier, |
| 29 uint32_t user_id); | 29 uint32_t user_id); |
| 30 Identity(const GURL& in_url, | 30 Identity(const GURL& in_url, |
| 31 const std::string& in_qualifier, | 31 const std::string& in_qualifier, |
| 32 uint32_t user, | 32 uint32_t user, |
| 33 CapabilityFilter filter); | 33 CapabilityFilter filter); |
| 34 ~Identity(); | 34 ~Identity(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 // Creates an identity for the Shell, used when the Shell connects to | 60 // Creates an identity for the Shell, used when the Shell connects to |
| 61 // applications. | 61 // applications. |
| 62 Identity CreateShellIdentity(); | 62 Identity CreateShellIdentity(); |
| 63 | 63 |
| 64 } // namespace shell | 64 } // namespace shell |
| 65 } // namespace mojo | 65 } // namespace mojo |
| 66 | 66 |
| 67 #endif // MOJO_SHELL_IDENTITY_H_ | 67 #endif // MOJO_SHELL_IDENTITY_H_ |
| OLD | NEW |