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

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

Issue 2003973002: net::AddressList no longer privately inherits from std::vector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « net/base/address_list.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #include "net/base/address_list.h" 5 #include "net/base/address_list.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 28
29 dict->Set("address_list", std::move(list)); 29 dict->Set("address_list", std::move(list));
30 return std::move(dict); 30 return std::move(dict);
31 } 31 }
32 32
33 } // namespace 33 } // namespace
34 34
35 AddressList::AddressList() {} 35 AddressList::AddressList() {}
36 36
37 AddressList::AddressList(const AddressList&) = default;
38
37 AddressList::~AddressList() {} 39 AddressList::~AddressList() {}
38 40
39 AddressList::AddressList(const IPEndPoint& endpoint) { 41 AddressList::AddressList(const IPEndPoint& endpoint) {
40 push_back(endpoint); 42 push_back(endpoint);
41 } 43 }
42 44
43 // static 45 // static
44 AddressList AddressList::CreateFromIPAddress(const IPAddress& address, 46 AddressList AddressList::CreateFromIPAddress(const IPAddress& address,
45 uint16_t port) { 47 uint16_t port) {
46 return AddressList(IPEndPoint(address, port)); 48 return AddressList(IPEndPoint(address, port));
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 void AddressList::SetDefaultCanonicalName() { 90 void AddressList::SetDefaultCanonicalName() {
89 DCHECK(!empty()); 91 DCHECK(!empty());
90 set_canonical_name(front().ToStringWithoutPort()); 92 set_canonical_name(front().ToStringWithoutPort());
91 } 93 }
92 94
93 NetLog::ParametersCallback AddressList::CreateNetLogCallback() const { 95 NetLog::ParametersCallback AddressList::CreateNetLogCallback() const {
94 return base::Bind(&NetLogAddressListCallback, this); 96 return base::Bind(&NetLogAddressListCallback, this);
95 } 97 }
96 98
97 } // namespace net 99 } // namespace net
OLDNEW
« no previous file with comments | « net/base/address_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698