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..9ddaca6a598c700c1d3782caae6c3212a9e386e0 |
--- /dev/null |
+++ b/net/dns/address_sorter.h |
@@ -0,0 +1,28 @@ |
+// 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/memory/scoped_ptr.h" |
+ |
+namespace net { |
cbentzel
2012/07/30 15:30:14
Would help to have file/class specific comment her
|
+ |
+class AddressList; |
+ |
+class AddressSorter { |
cbentzel
2012/07/30 15:30:14
Are there any thread restrictions?
szym
2012/07/30 16:28:45
This is implementation-dependent, but also not exp
cbentzel
2012/07/30 18:18:47
I think thread-safety is actually part of the inte
szym
2012/07/30 18:24:16
AddressSorterWin* has no essential state so it cou
|
+ public: |
+ virtual ~AddressSorter() {} |
+ |
+ // Sorts |list| according to revised RFC3484. |
+ virtual bool Sort(AddressList* list) const = 0; |
+ |
+ // Creates platform-dependent AddressSorter. |
cbentzel
2012/07/30 15:30:14
Can it be created multiple times?
szym
2012/07/30 16:28:45
I was hoping that scoped_ptr<> indicated that the
cbentzel
2012/07/30 18:18:47
Yeah, I think this is reasonable.
|
+ static scoped_ptr<AddressSorter> CreateAddressSorter(); |
+}; |
+ |
+} // namespace net |
+ |
+#endif // NET_DNS_ADDRESS_SORTER_H_ |