Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_DNS_HOSTS_H_ | 5 #ifndef NET_DNS_DNS_HOSTS_H_ |
| 6 #define NET_DNS_DNS_HOSTS_H_ | 6 #define NET_DNS_DNS_HOSTS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/containers/hash_tables.h" | 14 #include "base/containers/hash_tables.h" |
| 15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 16 #include "net/base/address_family.h" | 16 #include "net/base/address_family.h" |
| 17 #include "net/base/ip_address_number.h" // can't forward-declare IPAddressNumbe r | |
|
mmenke
2015/06/03 17:23:10
I think we can just remove the comment here
eroman
2015/06/03 18:29:10
Done.
| |
| 17 #include "net/base/net_export.h" | 18 #include "net/base/net_export.h" |
| 18 #include "net/base/net_util.h" // can't forward-declare IPAddressNumber | |
| 19 | 19 |
| 20 namespace net { | 20 namespace net { |
| 21 typedef std::pair<std::string, AddressFamily> DnsHostsKey; | 21 typedef std::pair<std::string, AddressFamily> DnsHostsKey; |
| 22 }; | 22 }; |
| 23 | 23 |
| 24 namespace BASE_HASH_NAMESPACE { | 24 namespace BASE_HASH_NAMESPACE { |
| 25 | 25 |
| 26 template<> | 26 template<> |
| 27 struct hash<net::DnsHostsKey> { | 27 struct hash<net::DnsHostsKey> { |
| 28 std::size_t operator()(const net::DnsHostsKey& key) const { | 28 std::size_t operator()(const net::DnsHostsKey& key) const { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 // As above but reads the file pointed to by |path|. | 81 // As above but reads the file pointed to by |path|. |
| 82 bool NET_EXPORT_PRIVATE ParseHostsFile(const base::FilePath& path, | 82 bool NET_EXPORT_PRIVATE ParseHostsFile(const base::FilePath& path, |
| 83 DnsHosts* dns_hosts); | 83 DnsHosts* dns_hosts); |
| 84 | 84 |
| 85 | 85 |
| 86 | 86 |
| 87 } // namespace net | 87 } // namespace net |
| 88 | 88 |
| 89 #endif // NET_DNS_DNS_HOSTS_H_ | 89 #endif // NET_DNS_DNS_HOSTS_H_ |
| 90 | 90 |
| OLD | NEW |