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

Side by Side Diff: net/base/address_list.h

Issue 368001: Second patch in making destructors of refcounted objects private. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/base/cert_verifier.cc » ('j') | net/http/http_auth_handler_digest.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_BASE_ADDRESS_LIST_H_ 5 #ifndef NET_BASE_ADDRESS_LIST_H_
6 #define NET_BASE_ADDRESS_LIST_H_ 6 #define NET_BASE_ADDRESS_LIST_H_
7 7
8 #include "base/ref_counted.h" 8 #include "base/ref_counted.h"
9 9
10 struct addrinfo; 10 struct addrinfo;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // Used by unit-tests to manually set the TCP socket address. 47 // Used by unit-tests to manually set the TCP socket address.
48 static AddressList CreateIPv6Address(unsigned char data[16]); 48 static AddressList CreateIPv6Address(unsigned char data[16]);
49 49
50 // Get access to the head of the addrinfo list. 50 // Get access to the head of the addrinfo list.
51 const struct addrinfo* head() const { return data_->head; } 51 const struct addrinfo* head() const { return data_->head; }
52 52
53 private: 53 private:
54 struct Data : public base::RefCountedThreadSafe<Data> { 54 struct Data : public base::RefCountedThreadSafe<Data> {
55 Data(struct addrinfo* ai, bool is_system_created) 55 Data(struct addrinfo* ai, bool is_system_created)
56 : head(ai), is_system_created(is_system_created) {} 56 : head(ai), is_system_created(is_system_created) {}
57 ~Data();
58 struct addrinfo* head; 57 struct addrinfo* head;
59 58
60 // Indicates which free function to use for |head|. 59 // Indicates which free function to use for |head|.
61 bool is_system_created; 60 bool is_system_created;
61
62 private:
63 friend class base::RefCountedThreadSafe<Data>;
64
65 ~Data();
62 }; 66 };
63 67
64 explicit AddressList(Data* data) : data_(data) {} 68 explicit AddressList(Data* data) : data_(data) {}
65 69
66 scoped_refptr<Data> data_; 70 scoped_refptr<Data> data_;
67 }; 71 };
68 72
69 } // namespace net 73 } // namespace net
70 74
71 #endif // NET_BASE_ADDRESS_LIST_H_ 75 #endif // NET_BASE_ADDRESS_LIST_H_
OLDNEW
« no previous file with comments | « no previous file | net/base/cert_verifier.cc » ('j') | net/http/http_auth_handler_digest.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698