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

Side by Side Diff: remoting/protocol/network_settings.cc

Issue 390983003: Remove remoting/jingle_glue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/network_settings.h ('k') | remoting/protocol/network_settings_unittest.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/jingle_glue/network_settings.h" 5 #include "remoting/protocol/network_settings.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 12
13 namespace remoting { 13 namespace remoting {
14 namespace protocol {
14 15
15 // static 16 // static
16 bool NetworkSettings::ParsePortRange(const std::string& port_range, 17 bool NetworkSettings::ParsePortRange(const std::string& port_range,
17 int* out_min_port, 18 int* out_min_port,
18 int* out_max_port) { 19 int* out_max_port) {
19 size_t separator_index = port_range.find('-'); 20 size_t separator_index = port_range.find('-');
20 if (separator_index == std::string::npos) 21 if (separator_index == std::string::npos)
21 return false; 22 return false;
22 23
23 std::string min_port_string, max_port_string; 24 std::string min_port_string, max_port_string;
(...skipping 11 matching lines...) Expand all
35 } 36 }
36 37
37 if (min_port == 0 || min_port > max_port || max_port > USHRT_MAX) 38 if (min_port == 0 || min_port > max_port || max_port > USHRT_MAX)
38 return false; 39 return false;
39 40
40 *out_min_port = static_cast<int>(min_port); 41 *out_min_port = static_cast<int>(min_port);
41 *out_max_port = static_cast<int>(max_port); 42 *out_max_port = static_cast<int>(max_port);
42 return true; 43 return true;
43 } 44 }
44 45
46 } // namespace protocol
45 } // namespace remoting 47 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/network_settings.h ('k') | remoting/protocol/network_settings_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698