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

Unified Diff: content/browser/geolocation/wifi_data_provider_win.cc

Issue 168643002: Convert scoped_ptr_malloc -> scoped_ptr, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « chrome/common/net/x509_certificate_model_nss.cc ('k') | content/common/gpu/media/rendering_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/geolocation/wifi_data_provider_win.cc
diff --git a/content/browser/geolocation/wifi_data_provider_win.cc b/content/browser/geolocation/wifi_data_provider_win.cc
index d5149cc54a0375a634cc90493e0377916309afb3..9345144438d9bea963b1a371033fee5152979b5a 100644
--- a/content/browser/geolocation/wifi_data_provider_win.cc
+++ b/content/browser/geolocation/wifi_data_provider_win.cc
@@ -152,7 +152,8 @@ int PerformQuery(HANDLE adapter_handle,
BYTE* buffer,
DWORD buffer_size,
DWORD* bytes_out);
-bool ResizeBuffer(int requested_size, scoped_ptr_malloc<BYTE>* buffer);
+bool ResizeBuffer(int requested_size,
+ scoped_ptr<BYTE, base::FreeDeleter>* buffer);
// Gets the system directory and appends a trailing slash if not already
// present.
bool GetSystemDirectory(base::string16* path);
@@ -468,8 +469,8 @@ bool WindowsNdisApi::GetInterfaceDataNDIS(HANDLE adapter_handle,
WifiData::AccessPointDataSet* data) {
DCHECK(data);
- scoped_ptr_malloc<BYTE> buffer(
- reinterpret_cast<BYTE*>(malloc(oid_buffer_size_)));
+ scoped_ptr<BYTE, base::FreeDeleter> buffer(
+ static_cast<BYTE*>(malloc(oid_buffer_size_)));
if (buffer == NULL) {
return false;
}
@@ -597,7 +598,8 @@ int PerformQuery(HANDLE adapter_handle,
return ERROR_SUCCESS;
}
-bool ResizeBuffer(int requested_size, scoped_ptr_malloc<BYTE>* buffer) {
+bool ResizeBuffer(int requested_size,
+ scoped_ptr<BYTE, base::FreeDeleter>* buffer) {
DCHECK_GT(requested_size, 0);
DCHECK(buffer);
if (requested_size > kMaximumBufferSize) {
« no previous file with comments | « chrome/common/net/x509_certificate_model_nss.cc ('k') | content/common/gpu/media/rendering_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698