Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_UTIL_H_ | 5 #ifndef REMOTING_BASE_UTIL_H_ |
| 6 #define REMOTING_BASE_UTIL_H_ | 6 #define REMOTING_BASE_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "media/base/video_frame.h" | 10 #include "media/base/video_frame.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 | 89 |
| 90 // Replaces every occurrence of "\r\n" in a string by "\n". | 90 // Replaces every occurrence of "\r\n" in a string by "\n". |
| 91 std::string ReplaceCrLfByLf(const std::string& in); | 91 std::string ReplaceCrLfByLf(const std::string& in); |
| 92 | 92 |
| 93 // Checks if the given string is a valid UTF-8 string. | 93 // Checks if the given string is a valid UTF-8 string. |
| 94 bool StringIsUtf8(const char* data, size_t length); | 94 bool StringIsUtf8(const char* data, size_t length); |
| 95 | 95 |
| 96 bool DoesRectContain(const webrtc::DesktopRect& a, | 96 bool DoesRectContain(const webrtc::DesktopRect& a, |
| 97 const webrtc::DesktopRect& b); | 97 const webrtc::DesktopRect& b); |
| 98 | 98 |
| 99 // Parse string in the form "<min_port>-<max_port>". E.g. "12400-12409". | |
| 100 // Returns true if string was parsed successfuly. | |
| 101 bool ParsePortRange(const std::string& port_range, int* out_min_port, | |
|
Sergey Ulanov
2014/03/24 23:37:12
nit:move out_min_port to the next line (one argume
Sergey Ulanov
2014/03/24 23:37:12
This doesn't belong in remoting/base (and I'd like
dcaiafa
2014/03/26 15:29:16
Done.
dcaiafa
2014/03/26 15:29:16
Moved to network_settings.*
| |
| 102 int* out_max_port); | |
| 103 | |
| 99 } // namespace remoting | 104 } // namespace remoting |
| 100 | 105 |
| 101 #endif // REMOTING_BASE_UTIL_H_ | 106 #endif // REMOTING_BASE_UTIL_H_ |
| OLD | NEW |