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

Unified Diff: net/dns/address_sorter_posix.cc

Issue 1520493002: Remove ScopedVector from address_sorter_posix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix include order Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a5647f8aa271329732bdf4da11355fff740f7ee8 100644
--- a/net/dns/address_sorter_posix.cc
+++ b/net/dns/address_sorter_posix.cc
@@ -16,9 +16,10 @@
#endif
#include <algorithm>
+#include <vector>
#include "base/logging.h"
-#include "base/memory/scoped_vector.h"
+#include "base/memory/scoped_ptr.h"
#include "net/base/net_errors.h"
#include "net/socket/client_socket_factory.h"
#include "net/udp/datagram_client_socket.h"
@@ -186,8 +187,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 +258,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());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698