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

Side by Side Diff: mojo/shell/identity.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
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_IDENTITY_H_ 5 #ifndef MOJO_SHELL_IDENTITY_H_
6 #define MOJO_SHELL_IDENTITY_H_ 6 #define MOJO_SHELL_IDENTITY_H_
7 7
8 #include "url/gurl.h" 8 #include "url/gurl.h"
9 9
10 namespace mojo { 10 namespace mojo {
11 namespace shell { 11 namespace shell {
12 12
13 /** 13 /**
14 * Represents the identity of an application. |url| is the url of the 14 * Represents the identity of an application. |url| is the URL of the
15 * application. |qualifier| is a string that allows to tie a specific instance 15 * application. |qualifier| is a string that allows to tie a specific instance
16 * of an application to another. It is used by content handlers that need to be 16 * of an application to another. A typical use case of qualifier is to control
Ben Goodger (Google) 2015/09/02 22:20:33 nit: C++ comments since you're changing the commen
yzshen1 2015/09/03 00:06:39 Done.
17 * run in the context of another application. 17 * process grouping for a given application URL. For example, the core services
18 * are grouped into "Core"/"Files"/"Network"/etc. using qualifier; content
19 * handler's qualifier is derived from the origin of the content.
18 */ 20 */
19 struct Identity { 21 struct Identity {
22 Identity();
20 Identity(const GURL& in_url, const std::string& in_qualifier); 23 Identity(const GURL& in_url, const std::string& in_qualifier);
21 explicit Identity(const GURL& in_url); 24 explicit Identity(const GURL& in_url);
25
22 bool operator<(const Identity& other) const; 26 bool operator<(const Identity& other) const;
27 bool is_null() const { return url.is_empty(); }
23 28
24 const GURL url; 29 GURL url;
25 const std::string qualifier; 30 std::string qualifier;
26 }; 31 };
27 32
28 } // namespace shell 33 } // namespace shell
29 } // namespace mojo 34 } // namespace mojo
30 35
31 #endif // MOJO_SHELL_IDENTITY_H_ 36 #endif // MOJO_SHELL_IDENTITY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698