Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_DNS_ADDRESS_SORTER_H_ | |
| 6 #define NET_DNS_ADDRESS_SORTER_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 | |
| 11 namespace net { | |
|
cbentzel
2012/07/30 15:30:14
Would help to have file/class specific comment her
| |
| 12 | |
| 13 class AddressList; | |
| 14 | |
| 15 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
| |
| 16 public: | |
| 17 virtual ~AddressSorter() {} | |
| 18 | |
| 19 // Sorts |list| according to revised RFC3484. | |
| 20 virtual bool Sort(AddressList* list) const = 0; | |
| 21 | |
| 22 // 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.
| |
| 23 static scoped_ptr<AddressSorter> CreateAddressSorter(); | |
| 24 }; | |
| 25 | |
| 26 } // namespace net | |
| 27 | |
| 28 #endif // NET_DNS_ADDRESS_SORTER_H_ | |
| OLD | NEW |