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

Unified Diff: net/base/address_list.h

Issue 155618: Use manually constructed IPv6 socket addresses for tests, rather than system ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 11 years, 5 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 | « DEPS ('k') | net/base/address_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/address_list.h
===================================================================
--- net/base/address_list.h (revision 21052)
+++ net/base/address_list.h (working copy)
@@ -15,6 +15,9 @@
// class is designed to be copied around by value.
class AddressList {
public:
+ // Constructs an empty address list.
+ AddressList() {}
+
// Adopt the given addrinfo list in place of the existing one if any. This
// hands over responsibility for freeing the addrinfo list to the AddressList
// object.
@@ -41,6 +44,9 @@
// empty state as when first constructed.
void Reset();
+ // Used by unit-tests to manually set the TCP socket address.
+ static AddressList CreateIPv6Address(unsigned char data[16]);
+
// Get access to the head of the addrinfo list.
const struct addrinfo* head() const { return data_->head; }
@@ -54,6 +60,9 @@
// Indicates which free function to use for |head|.
bool is_system_created;
};
+
+ explicit AddressList(Data* data) : data_(data) {}
+
scoped_refptr<Data> data_;
};
« no previous file with comments | « DEPS ('k') | net/base/address_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698