Index: chrome/app/image_pre_reader_win.cc |
diff --git a/chrome/app/image_pre_reader_win.cc b/chrome/app/image_pre_reader_win.cc |
index 16d3a1a85f8fbb4b8d513bb02d3608410ba64405..68366695179519b1abf340f9baf89d4ddc01e917 100644 |
--- a/chrome/app/image_pre_reader_win.cc |
+++ b/chrome/app/image_pre_reader_win.cc |
@@ -35,7 +35,7 @@ void StaticAssertions() { |
// This struct provides a deallocation functor for use with scoped_ptr<T> |
// allocated with ::VirtualAlloc(). |
-struct ScopedPtrVirtualFree { |
+struct VirtualFreeDeleter { |
void operator() (void* ptr) { |
::VirtualFree(ptr, 0, MEM_RELEASE); |
} |
@@ -252,8 +252,8 @@ bool ImagePreReader::PartialPreReadImageOnDisk(const wchar_t* file_path, |
CHECK(pe_image.VerifyMagic()); |
// Allocate a buffer to hold the pre-read bytes. |
- scoped_ptr_malloc<uint8, ScopedPtrVirtualFree> buffer( |
- reinterpret_cast<uint8*>( |
+ scoped_ptr<uint8, VirtualFreeDeleter> buffer( |
+ static_cast<uint8*>( |
::VirtualAlloc(NULL, max_chunk_size, MEM_COMMIT, PAGE_READWRITE))); |
if (buffer.get() == NULL) |
return false; |