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

Unified Diff: net/dns/address_sorter.h

Issue 10855163: Revert 151586 - [net/dns] Resolve AF_UNSPEC on dual-stacked systems. Sort addresses according to RF… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/net_util_unittest.cc ('k') | net/dns/address_sorter_posix.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/address_sorter.h
===================================================================
--- net/dns/address_sorter.h (revision 151600)
+++ net/dns/address_sorter.h (working copy)
@@ -1,46 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef NET_DNS_ADDRESS_SORTER_H_
-#define NET_DNS_ADDRESS_SORTER_H_
-
-#include "base/basictypes.h"
-#include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
-#include "net/base/net_export.h"
-
-namespace net {
-
-class AddressList;
-
-// Sorts AddressList according to RFC3484, by likelihood of successful
-// connection. Depending on the platform, the sort could be performed
-// asynchronously by the OS, or synchronously by local implementation.
-// AddressSorter does not necessarily preserve port numbers on the sorted list.
-class NET_EXPORT AddressSorter {
- public:
- typedef base::Callback<void(bool success,
- const AddressList& list)> CallbackType;
-
- virtual ~AddressSorter() {}
-
- // Sorts |list|, which must include at least one IPv6 address.
- // Calls |callback| upon completion. Could complete synchronously. Could
- // complete after this AddressSorter is destroyed.
- virtual void Sort(const AddressList& list,
- const CallbackType& callback) const = 0;
-
- // Creates platform-dependent AddressSorter.
- static scoped_ptr<AddressSorter> CreateAddressSorter();
-
- protected:
- AddressSorter() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AddressSorter);
-};
-
-} // namespace net
-
-#endif // NET_DNS_ADDRESS_SORTER_H_
« no previous file with comments | « net/base/net_util_unittest.cc ('k') | net/dns/address_sorter_posix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698