Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / mojo / shell / identity.h
blobf60b2c5061f1beecea47819c6baa904809856b8b
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
3 // found in the LICENSE file.
5 #ifndef MOJO_SHELL_IDENTITY_H_
6 #define MOJO_SHELL_IDENTITY_H_
8 #include "url/gurl.h"
10 namespace mojo {
11 namespace shell {
13 // Represents the identity of an application.
14 // |url| is the URL of the application.
15 // |qualifier| is a string that allows to tie a specific instance of an
16 // application to another. A typical use case of qualifier is to control process
17 // grouping for a given application URL. For example, the core services are
18 // grouped into "Core"/"Files"/"Network"/etc. using qualifier; content handler's
19 // qualifier is derived from the origin of the content.
20 struct Identity {
21 Identity();
22 Identity(const GURL& in_url, const std::string& in_qualifier);
23 explicit Identity(const GURL& in_url);
25 bool operator<(const Identity& other) const;
26 bool is_null() const { return url.is_empty(); }
28 GURL url;
29 std::string qualifier;
32 } // namespace shell
33 } // namespace mojo
35 #endif // MOJO_SHELL_IDENTITY_H_