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

Side by Side Diff: net/base/host_port_pair.cc

Issue 1230313005: split port_util.h off of net_util.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove garbage that got added Created 5 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
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | net/base/net_util.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 (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 #include "net/base/host_port_pair.h" 5 #include "net/base/host_port_pair.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
12 #include "net/base/ip_endpoint.h" 12 #include "net/base/ip_endpoint.h"
13 #include "net/base/net_util.h" 13 #include "net/base/port_util.h"
14 #include "url/gurl.h" 14 #include "url/gurl.h"
15 15
16 namespace net { 16 namespace net {
17 17
18 HostPortPair::HostPortPair() : port_(0) {} 18 HostPortPair::HostPortPair() : port_(0) {}
19 HostPortPair::HostPortPair(const std::string& in_host, uint16_t in_port) 19 HostPortPair::HostPortPair(const std::string& in_host, uint16_t in_port)
20 : host_(in_host), port_(in_port) { 20 : host_(in_host), port_(in_port) {
21 } 21 }
22 22
23 // static 23 // static
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Check to see if the host is an IPv6 address. If so, added brackets. 67 // Check to see if the host is an IPv6 address. If so, added brackets.
68 if (host_.find(':') != std::string::npos) { 68 if (host_.find(':') != std::string::npos) {
69 DCHECK_NE(host_[0], '['); 69 DCHECK_NE(host_[0], '[');
70 return base::StringPrintf("[%s]", host_.c_str()); 70 return base::StringPrintf("[%s]", host_.c_str());
71 } 71 }
72 72
73 return host_; 73 return host_;
74 } 74 }
75 75
76 } // namespace net 76 } // namespace net
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | net/base/net_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698