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

Side by Side Diff: remoting/signaling/jid_util.h

Issue 2271933002: Updating It2Me to use the new ValidatingAuthenticator class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@authenticator
Patch Set: Merging upstream changes Created 4 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 | « remoting/protocol/it2me_host_authenticator_factory.cc ('k') | no next file » | 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 REMOTING_SIGNALING_JID_UTIL_H_ 5 #ifndef REMOTING_SIGNALING_JID_UTIL_H_
6 #define REMOTING_SIGNALING_JID_UTIL_H_ 6 #define REMOTING_SIGNALING_JID_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace remoting { 10 namespace remoting {
11 11
12 // Normalizes the |jid| by converting case-insensitive parts (node and domain) 12 // Normalizes the |jid| by converting case-insensitive parts (node and domain)
13 // to lower-case. 13 // to lower-case.
14 std::string NormalizeJid(const std::string& jid); 14 std::string NormalizeJid(const std::string& jid);
15 15
16 // Splits a JID into a bare JID and a resource suffix. Either or both 16 // Splits a JID into a bare JID and a resource suffix. Either |full_jid|,
17 // of |full_jid| and |resource| may be null. If |full_jid| is already 17 // |resource|, or both may be null. If |full_jid| is already
18 // a bare JID, |resource| is set to the empty string. Returns true of 18 // a bare JID, |resource| is set to the empty string. Returns true if
19 // |full_jid| has a resource, false if not. 19 // |full_jid| has a resource, false if not.
20 // 20 //
21 // e.g. "user@domain/resource" -> "user@domain", "resource", true 21 // e.g. "user@domain/resource" -> "user@domain", "resource", true
22 // "user@domain" -> "user@domain", "", false 22 // "user@domain" -> "user@domain", "", false
23 bool SplitJidResource(const std::string& full_jid, 23 bool SplitJidResource(const std::string& full_jid,
24 std::string* bare_jid, 24 std::string* bare_jid,
25 std::string* resource); 25 std::string* resource);
26 26
27 } // namespace remoting 27 } // namespace remoting
28 28
29 #endif // REMOTING_SIGNALING_JID_UTIL_H_ 29 #endif // REMOTING_SIGNALING_JID_UTIL_H_
OLDNEW
« no previous file with comments | « remoting/protocol/it2me_host_authenticator_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698