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

Unified Diff: net/dns/dns_config_service_win_unittest.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/dns/dns_config_service_win.cc ('k') | net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_config_service_win_unittest.cc
diff --git a/net/dns/dns_config_service_win_unittest.cc b/net/dns/dns_config_service_win_unittest.cc
index 3f3e4ed1e3758a34b7844dab51b96923421dd90b..7ac01d1e536fd1e431c85e74f77dcc9a96ee60fa 100644
--- a/net/dns/dns_config_service_win_unittest.cc
+++ b/net/dns/dns_config_service_win_unittest.cc
@@ -58,7 +58,7 @@ struct AdapterInfo {
int ports[4];
};
-scoped_ptr_malloc<IP_ADAPTER_ADDRESSES> CreateAdapterAddresses(
+scoped_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> CreateAdapterAddresses(
const AdapterInfo* infos) {
size_t num_adapters = 0;
size_t num_addresses = 0;
@@ -72,8 +72,8 @@ scoped_ptr_malloc<IP_ADAPTER_ADDRESSES> CreateAdapterAddresses(
size_t heap_size = num_adapters * sizeof(IP_ADAPTER_ADDRESSES) +
num_addresses * (sizeof(IP_ADAPTER_DNS_SERVER_ADDRESS) +
sizeof(struct sockaddr_storage));
- scoped_ptr_malloc<IP_ADAPTER_ADDRESSES> heap(
- reinterpret_cast<IP_ADAPTER_ADDRESSES*>(malloc(heap_size)));
+ scoped_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> heap(
+ static_cast<IP_ADAPTER_ADDRESSES*>(malloc(heap_size)));
CHECK(heap.get());
memset(heap.get(), 0, heap_size);
« no previous file with comments | « net/dns/dns_config_service_win.cc ('k') | net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698