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

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

Issue 1542203002: Switch to standard integer types in remoting/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@int-remoting-host
Patch Set: Created 5 years 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/signaling/iq_sender.h ('k') | remoting/signaling/jingle_info_request.h » ('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 #include "remoting/signaling/jid_util.h" 5 #include "remoting/signaling/jid_util.h"
6 6
7 #include <stddef.h>
8
7 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
8 10
9 namespace remoting { 11 namespace remoting {
10 12
11 std::string NormalizeJid(const std::string& jid) { 13 std::string NormalizeJid(const std::string& jid) {
12 std::string bare_jid; 14 std::string bare_jid;
13 std::string resource; 15 std::string resource;
14 if (SplitJidResource(jid, &bare_jid, &resource)) { 16 if (SplitJidResource(jid, &bare_jid, &resource)) {
15 return base::ToLowerASCII(bare_jid) + "/" + resource; 17 return base::ToLowerASCII(bare_jid) + "/" + resource;
16 } 18 }
(...skipping 17 matching lines...) Expand all
34 if (bare_jid) { 36 if (bare_jid) {
35 *bare_jid = full_jid.substr(0, slash_index); 37 *bare_jid = full_jid.substr(0, slash_index);
36 } 38 }
37 if (resource) { 39 if (resource) {
38 *resource = full_jid.substr(slash_index + 1); 40 *resource = full_jid.substr(slash_index + 1);
39 } 41 }
40 return true; 42 return true;
41 } 43 }
42 44
43 } // namespace remoting 45 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/signaling/iq_sender.h ('k') | remoting/signaling/jingle_info_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698