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

Side by Side Diff: net/quic/quic_socket_address_coder.cc

Issue 1162973005: Stop including ip_address_number.h from net_util.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove some header sorting changes, seems to be breaking windows Created 5 years, 6 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 | « net/quic/quic_packet_reader.cc ('k') | net/quic/quic_socket_address_coder_test.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 "net/quic/quic_socket_address_coder.h" 5 #include "net/quic/quic_socket_address_coder.h"
6 6
7 #include "net/base/sys_addrinfo.h"
8
7 using std::string; 9 using std::string;
8 10
9 namespace net { 11 namespace net {
10 12
11 namespace { 13 namespace {
12 14
13 // For convenience, the values of these constants match the values of AF_INET 15 // For convenience, the values of these constants match the values of AF_INET
14 // and AF_INET6 on Linux. 16 // and AF_INET6 on Linux.
15 const uint16 kIPv4 = 2; 17 const uint16 kIPv4 = 2;
16 const uint16 kIPv6 = 10; 18 const uint16 kIPv6 = 10;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 if (length != sizeof(port)) { 82 if (length != sizeof(port)) {
81 return false; 83 return false;
82 } 84 }
83 memcpy(&port, data, length); 85 memcpy(&port, data, length);
84 86
85 address_ = IPEndPoint(ip, port); 87 address_ = IPEndPoint(ip, port);
86 return true; 88 return true;
87 } 89 }
88 90
89 } // namespace net 91 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_packet_reader.cc ('k') | net/quic/quic_socket_address_coder_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698