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

Side by Side Diff: net/dns/address_sorter_win.cc

Issue 169193002: Convert scoped_ptr_malloc -> scoped_ptr, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « net/cert/x509_util_nss.cc ('k') | net/dns/dns_config_service_win.h » ('j') | 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/dns/address_sorter.h" 5 #include "net/dns/address_sorter.h"
6 6
7 #include <winsock2.h> 7 #include <winsock2.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 ipe.port()); 117 ipe.port());
118 } 118 }
119 list.push_back(ipe); 119 list.push_back(ipe);
120 } 120 }
121 } 121 }
122 callback_.Run(success_, list); 122 callback_.Run(success_, list);
123 } 123 }
124 124
125 const CallbackType callback_; 125 const CallbackType callback_;
126 const size_t buffer_size_; 126 const size_t buffer_size_;
127 scoped_ptr_malloc<SOCKET_ADDRESS_LIST> input_buffer_; 127 scoped_ptr<SOCKET_ADDRESS_LIST, base::FreeDeleter> input_buffer_;
128 scoped_ptr_malloc<SOCKET_ADDRESS_LIST> output_buffer_; 128 scoped_ptr<SOCKET_ADDRESS_LIST, base::FreeDeleter> output_buffer_;
129 bool success_; 129 bool success_;
130 130
131 DISALLOW_COPY_AND_ASSIGN(Job); 131 DISALLOW_COPY_AND_ASSIGN(Job);
132 }; 132 };
133 133
134 DISALLOW_COPY_AND_ASSIGN(AddressSorterWin); 134 DISALLOW_COPY_AND_ASSIGN(AddressSorterWin);
135 }; 135 };
136 136
137 // Merges |list_ipv4| and |list_ipv6| before passing it to |callback|, but 137 // Merges |list_ipv4| and |list_ipv6| before passing it to |callback|, but
138 // only if |success| is true. 138 // only if |success| is true.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 // static 190 // static
191 scoped_ptr<AddressSorter> AddressSorter::CreateAddressSorter() { 191 scoped_ptr<AddressSorter> AddressSorter::CreateAddressSorter() {
192 if (base::win::GetVersion() < base::win::VERSION_VISTA) 192 if (base::win::GetVersion() < base::win::VERSION_VISTA)
193 return scoped_ptr<AddressSorter>(new AddressSorterWinXP()); 193 return scoped_ptr<AddressSorter>(new AddressSorterWinXP());
194 return scoped_ptr<AddressSorter>(new AddressSorterWin()); 194 return scoped_ptr<AddressSorter>(new AddressSorterWin());
195 } 195 }
196 196
197 } // namespace net 197 } // namespace net
198 198
OLDNEW
« no previous file with comments | « net/cert/x509_util_nss.cc ('k') | net/dns/dns_config_service_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698