OLD | NEW |
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_address_mismatch.h" | 5 #include "net/quic/core/quic_address_mismatch.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/base/ip_address.h" | 8 #include "net/base/ip_address.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
11 | 11 |
12 int GetAddressMismatch(const IPEndPoint& first_address, | 12 int GetAddressMismatch(const IPEndPoint& first_address, |
13 const IPEndPoint& second_address) { | 13 const IPEndPoint& second_address) { |
14 if (first_address.address().empty() || second_address.address().empty()) { | 14 if (first_address.address().empty() || second_address.address().empty()) { |
15 return -1; | 15 return -1; |
(...skipping 26 matching lines...) Expand all Loading... |
42 CHECK_EQ(sample, QUIC_ADDRESS_MISMATCH_BASE); | 42 CHECK_EQ(sample, QUIC_ADDRESS_MISMATCH_BASE); |
43 sample += 2; | 43 sample += 2; |
44 } | 44 } |
45 if (!first_ipv4) { | 45 if (!first_ipv4) { |
46 sample += 1; | 46 sample += 1; |
47 } | 47 } |
48 return sample; | 48 return sample; |
49 } | 49 } |
50 | 50 |
51 } // namespace net | 51 } // namespace net |
OLD | NEW |