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

Unified Diff: net/proxy/dhcp_proxy_script_fetcher_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc ('k') | net/socket_stream/socket_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/dhcp_proxy_script_fetcher_win.cc
diff --git a/net/proxy/dhcp_proxy_script_fetcher_win.cc b/net/proxy/dhcp_proxy_script_fetcher_win.cc
index 037268f03a094c7ec7e7754c1ab1e8975878b8b6..54e2bdfcb7104632a3c678694f52e1c500b4bbc0 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_win.cc
+++ b/net/proxy/dhcp_proxy_script_fetcher_win.cc
@@ -320,14 +320,13 @@ bool DhcpProxyScriptFetcherWin::GetCandidateAdapterNames(
// The GetAdaptersAddresses MSDN page recommends using a size of 15000 to
// avoid reallocation.
ULONG adapters_size = 15000;
- scoped_ptr_malloc<IP_ADAPTER_ADDRESSES> adapters;
+ scoped_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> adapters;
ULONG error = ERROR_SUCCESS;
int num_tries = 0;
base::ElapsedTimer time_api_access;
do {
- adapters.reset(
- reinterpret_cast<IP_ADAPTER_ADDRESSES*>(malloc(adapters_size)));
+ adapters.reset(static_cast<IP_ADAPTER_ADDRESSES*>(malloc(adapters_size)));
// Return only unicast addresses, and skip information we do not need.
error = GetAdaptersAddresses(AF_UNSPEC,
GAA_FLAG_SKIP_ANYCAST |
« no previous file with comments | « net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc ('k') | net/socket_stream/socket_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698