| OLD | NEW |
| (Empty) | |
| 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. |
| 4 |
| 5 #include "remoting/signaling/jid_util.h" |
| 6 |
| 7 #include "base/strings/string_util.h" |
| 8 |
| 9 namespace remoting { |
| 10 |
| 11 std::string NormalizeJid(const std::string& jid) { |
| 12 size_t slash_pos = jid.find('/'); |
| 13 |
| 14 // In case there the jid doesn't have resource id covert the whole value to |
| 15 // lower-case. |
| 16 if (slash_pos == std::string::npos) |
| 17 return base::StringToLowerASCII(jid); |
| 18 |
| 19 return base::StringToLowerASCII(jid.substr(0, slash_pos)) + |
| 20 jid.substr(slash_pos); |
| 21 } |
| 22 |
| 23 } // namespace remoting |
| OLD | NEW |