Chromium Code Reviews| Index: net/dns/address_sorter_posix.cc |
| diff --git a/net/dns/address_sorter_posix.cc b/net/dns/address_sorter_posix.cc |
| index 9bbe835ebc806fc0d2a9a513e8102566f9f6e935..692dd8cc53a3e264db324e2201decaafb5284003 100644 |
| --- a/net/dns/address_sorter_posix.cc |
| +++ b/net/dns/address_sorter_posix.cc |
| @@ -6,6 +6,10 @@ |
| #include <netinet/in.h> |
| +#include <vector> |
|
mmenke
2015/12/11 14:32:49
I think this should go down with <algorithm> (Inc
|
| + |
| +#include "base/memory/scoped_ptr.h" |
|
mmenke
2015/12/11 14:32:49
I think these should go just above logging.h
|
| + |
| #if defined(OS_MACOSX) || defined(OS_BSD) |
| #include <sys/socket.h> // Must be included before ifaddrs.h. |
| #include <ifaddrs.h> |
| @@ -18,7 +22,6 @@ |
| #include <algorithm> |
| #include "base/logging.h" |
| -#include "base/memory/scoped_vector.h" |
| #include "net/base/net_errors.h" |
| #include "net/socket/client_socket_factory.h" |
| #include "net/udp/datagram_client_socket.h" |
| @@ -186,8 +189,8 @@ struct DestinationInfo { |
| // Returns true iff |dst_a| should precede |dst_b| in the address list. |
| // RFC 3484, section 6. |
| -bool CompareDestinations(const DestinationInfo* dst_a, |
| - const DestinationInfo* dst_b) { |
| +bool CompareDestinations(const scoped_ptr<DestinationInfo>& dst_a, |
| + const scoped_ptr<DestinationInfo>& dst_b) { |
| // Rule 1: Avoid unusable destinations. |
| // Unusable destinations are already filtered out. |
| DCHECK(dst_a->src); |
| @@ -257,7 +260,7 @@ AddressSorterPosix::~AddressSorterPosix() { |
| void AddressSorterPosix::Sort(const AddressList& list, |
| const CallbackType& callback) const { |
| DCHECK(CalledOnValidThread()); |
| - ScopedVector<DestinationInfo> sort_list; |
| + std::vector<scoped_ptr<DestinationInfo>> sort_list; |
| for (size_t i = 0; i < list.size(); ++i) { |
| scoped_ptr<DestinationInfo> info(new DestinationInfo()); |