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

Side by Side Diff: net/quic/platform/impl/quic_test_loopback_impl.cc

Issue 2933613002: Add quic_test_loopback used for tests only. (Closed)
Patch Set: Created 3 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/platform/impl/quic_test_loopback_impl.h ('k') | net/tools/quic/end_to_end_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
(Empty)
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "net/quic/platform/impl/quic_test_loopback_impl.h"
6
7 namespace net {
8
9 IpAddressFamily AddressFamilyUnderTestImpl() {
10 return IpAddressFamily::IP_V4;
11 }
12
13 QuicIpAddress TestLoopback4Impl() {
14 return QuicIpAddress(QuicIpAddressImpl(IPAddress::IPv4Localhost()));
15 }
16
17 QuicIpAddress TestLoopback6Impl() {
18 return QuicIpAddress(QuicIpAddressImpl(IPAddress::IPv6Localhost()));
19 }
20
21 QuicIpAddress TestLoopbackImpl() {
22 return QuicIpAddress(QuicIpAddressImpl(IPAddress::IPv4Localhost()));
23 }
24
25 QuicIpAddress TestLoopbackImpl(int index) {
26 const uint8_t kLocalhostIPv4[] = {127, 0, 0, index};
27 return QuicIpAddress(QuicIpAddressImpl(IPAddress(kLocalhostIPv4)));
28 }
29
30 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/platform/impl/quic_test_loopback_impl.h ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698