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

Unified Diff: net/proxy/dhcp_proxy_script_adapter_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/dns/dns_config_service_win_unittest.cc ('k') | net/proxy/dhcp_proxy_script_fetcher_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc
diff --git a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc
index 569e81207820e0303e9bbec9d668259a00a50d9c..738f0c156cdfabc2925cca7b9864a306effeec95 100644
--- a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc
+++ b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc
@@ -233,11 +233,11 @@ std::string DhcpProxyScriptAdapterFetcher::GetPacURLFromDhcp(
// The maximum message size is typically 4096 bytes on Windows per
// http://support.microsoft.com/kb/321592
DWORD result_buffer_size = 4096;
- scoped_ptr_malloc<BYTE> result_buffer;
+ scoped_ptr<BYTE, base::FreeDeleter> result_buffer;
int retry_count = 0;
DWORD res = NO_ERROR;
do {
- result_buffer.reset(reinterpret_cast<BYTE*>(malloc(result_buffer_size)));
+ result_buffer.reset(static_cast<BYTE*>(malloc(result_buffer_size)));
// Note that while the DHCPCAPI_REQUEST_SYNCHRONOUS flag seems to indicate
// there might be an asynchronous mode, there seems to be (at least in
@@ -261,7 +261,7 @@ std::string DhcpProxyScriptAdapterFetcher::GetPacURLFromDhcp(
} while (res == ERROR_MORE_DATA && retry_count <= 3);
if (res != NO_ERROR) {
- LOG(INFO) << "Error fetching PAC URL from DHCP: " << res;
+ LOG(WARNING) << "Error fetching PAC URL from DHCP: " << res;
UMA_HISTOGRAM_COUNTS("Net.DhcpWpadUnhandledDhcpError", 1);
} else if (wpad_params.nBytesData) {
return SanitizeDhcpApiString(
« no previous file with comments | « net/dns/dns_config_service_win_unittest.cc ('k') | net/proxy/dhcp_proxy_script_fetcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698