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

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

Issue 1565303002: Change IPEndpoint::address() to return a net::IPAddress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback eroman Created 4 years, 11 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
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 #ifndef NET_QUIC_QUIC_SOCKET_ADDRESS_CODER_H_ 5 #ifndef NET_QUIC_QUIC_SOCKET_ADDRESS_CODER_H_
6 #define NET_QUIC_QUIC_SOCKET_ADDRESS_CODER_H_ 6 #define NET_QUIC_QUIC_SOCKET_ADDRESS_CODER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 11 matching lines...) Expand all
22 class NET_EXPORT_PRIVATE QuicSocketAddressCoder { 22 class NET_EXPORT_PRIVATE QuicSocketAddressCoder {
23 public: 23 public:
24 QuicSocketAddressCoder(); 24 QuicSocketAddressCoder();
25 explicit QuicSocketAddressCoder(const IPEndPoint& address); 25 explicit QuicSocketAddressCoder(const IPEndPoint& address);
26 ~QuicSocketAddressCoder(); 26 ~QuicSocketAddressCoder();
27 27
28 std::string Encode() const; 28 std::string Encode() const;
29 29
30 bool Decode(const char* data, size_t length); 30 bool Decode(const char* data, size_t length);
31 31
32 IPAddressNumber ip() const { return address_.address(); } 32 IPAddressNumber ip() const { return address_.address().bytes(); }
eroman 2016/01/13 23:19:42 I wonder if it is intentional that this code retur
martijnc 2016/01/14 22:48:17 Hmm, not sure why that is. Had a quick look at the
33 33
34 uint16_t port() const { return address_.port(); } 34 uint16_t port() const { return address_.port(); }
35 35
36 private: 36 private:
37 IPEndPoint address_; 37 IPEndPoint address_;
38 38
39 DISALLOW_COPY_AND_ASSIGN(QuicSocketAddressCoder); 39 DISALLOW_COPY_AND_ASSIGN(QuicSocketAddressCoder);
40 }; 40 };
41 41
42 } // namespace net 42 } // namespace net
43 43
44 #endif // NET_QUIC_QUIC_SOCKET_ADDRESS_CODER_H_ 44 #endif // NET_QUIC_QUIC_SOCKET_ADDRESS_CODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698