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

Side by Side Diff: net/dns/address_sorter_posix.h

Issue 1932363003: Remove net::IPAddressNumber. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/cert/x509_certificate_openssl.cc ('k') | net/dns/dns_test_util.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 (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 #ifndef NET_DNS_ADDRESS_SORTER_POSIX_H_ 5 #ifndef NET_DNS_ADDRESS_SORTER_POSIX_H_
6 #define NET_DNS_ADDRESS_SORTER_POSIX_H_ 6 #define NET_DNS_ADDRESS_SORTER_POSIX_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 12 matching lines...) Expand all
23 // This implementation uses explicit policy to perform the sorting. It is not 23 // This implementation uses explicit policy to perform the sorting. It is not
24 // thread-safe and always completes synchronously. 24 // thread-safe and always completes synchronously.
25 class NET_EXPORT_PRIVATE AddressSorterPosix 25 class NET_EXPORT_PRIVATE AddressSorterPosix
26 : public AddressSorter, 26 : public AddressSorter,
27 public base::NonThreadSafe, 27 public base::NonThreadSafe,
28 public NetworkChangeNotifier::IPAddressObserver { 28 public NetworkChangeNotifier::IPAddressObserver {
29 public: 29 public:
30 // Generic policy entry. 30 // Generic policy entry.
31 struct PolicyEntry { 31 struct PolicyEntry {
32 // IPv4 addresses must be mapped to IPv6. 32 // IPv4 addresses must be mapped to IPv6.
33 unsigned char prefix[kIPv6AddressSize]; 33 unsigned char prefix[IPAddress::kIPv6AddressSize];
34 unsigned prefix_length; 34 unsigned prefix_length;
35 unsigned value; 35 unsigned value;
36 }; 36 };
37 37
38 typedef std::vector<PolicyEntry> PolicyTable; 38 typedef std::vector<PolicyEntry> PolicyTable;
39 39
40 enum AddressScope { 40 enum AddressScope {
41 SCOPE_UNDEFINED = 0, 41 SCOPE_UNDEFINED = 0,
42 SCOPE_NODELOCAL = 1, 42 SCOPE_NODELOCAL = 1,
43 SCOPE_LINKLOCAL = 2, 43 SCOPE_LINKLOCAL = 2,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 PolicyTable precedence_table_; 84 PolicyTable precedence_table_;
85 PolicyTable label_table_; 85 PolicyTable label_table_;
86 PolicyTable ipv4_scope_table_; 86 PolicyTable ipv4_scope_table_;
87 87
88 DISALLOW_COPY_AND_ASSIGN(AddressSorterPosix); 88 DISALLOW_COPY_AND_ASSIGN(AddressSorterPosix);
89 }; 89 };
90 90
91 } // namespace net 91 } // namespace net
92 92
93 #endif // NET_DNS_ADDRESS_SORTER_POSIX_H_ 93 #endif // NET_DNS_ADDRESS_SORTER_POSIX_H_
OLDNEW
« no previous file with comments | « net/cert/x509_certificate_openssl.cc ('k') | net/dns/dns_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698