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

Unified Diff: net/dns/address_sorter.h

Issue 10442098: [net/dns] Resolve AF_UNSPEC on dual-stacked systems. Sort addresses according to RFC3484. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Working AddressSorterWin + measurements. Created 8 years, 6 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
Index: net/dns/address_sorter.h
diff --git a/net/dns/address_sorter.h b/net/dns/address_sorter.h
new file mode 100644
index 0000000000000000000000000000000000000000..22ac6b0517cc45afe16bd016e4f269fb7491b85b
--- /dev/null
+++ b/net/dns/address_sorter.h
@@ -0,0 +1,29 @@
+// 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_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace net {
+
+class AddressList;
+
+class AddressSorter {
+ public:
+ virtual ~AddressSorter() {}
+
+ // Sorts |list| according to revised RFC3484.
+ virtual bool Sort(AddressList* list) const = 0;
+
+ // Creates platform-dependent AddressSorter.
+ static scoped_ptr<AddressSorter> CreateAddressSorter();
+};
+
+} // namespace net
+
+#endif // NET_DNS_ADDRESS_SORTER_H_

Powered by Google App Engine
This is Rietveld 408576698