Chromium Code Reviews| Index: base/allocator/allocator_extension.cc |
| diff --git a/base/allocator/allocator_extension.cc b/base/allocator/allocator_extension.cc |
| index d4ed6d72f2768f7001f1dbe30c6b2df780d24e6e..fb54ac556c032daa5be60954a9dc56e20233247e 100644 |
| --- a/base/allocator/allocator_extension.cc |
| +++ b/base/allocator/allocator_extension.cc |
| @@ -9,10 +9,11 @@ |
| namespace base { |
| namespace allocator { |
| -bool GetProperty(const char* name, size_t* value) { |
| - thunks::GetPropertyFunction get_property_function = |
| - base::allocator::thunks::GetGetPropertyFunction(); |
| - return get_property_function != NULL && get_property_function(name, value); |
| +bool GetAllocatorWasteSize(size_t* size) { |
| + thunks::GetAllocatorWasteSizeFunction get_allocator_waste_size_function = |
| + base::allocator::thunks::GetGetAllocatorWasteSizeFunction(); |
|
darin (slow to review)
2012/10/23 17:28:30
nit: no need for base::allocator:: prefix when you
alexeif
2012/10/23 18:00:15
Done.
|
| + return get_allocator_waste_size_function != NULL && |
| + get_allocator_waste_size_function(size); |
| } |
| void GetStats(char* buffer, int buffer_length) { |
| @@ -32,11 +33,12 @@ void ReleaseFreeMemory() { |
| release_free_memory_function(); |
| } |
| -void SetGetPropertyFunction( |
| - thunks::GetPropertyFunction get_property_function) { |
| - DCHECK_EQ(base::allocator::thunks::GetGetPropertyFunction(), |
| - reinterpret_cast<thunks::GetPropertyFunction>(NULL)); |
| - base::allocator::thunks::SetGetPropertyFunction(get_property_function); |
| +void SetGetAllocatorWasteSizeFunction( |
| + thunks::GetAllocatorWasteSizeFunction get_allocator_waste_size_function) { |
| + DCHECK_EQ(base::allocator::thunks::GetGetAllocatorWasteSizeFunction(), |
| + reinterpret_cast<thunks::GetAllocatorWasteSizeFunction>(NULL)); |
| + base::allocator::thunks::SetGetAllocatorWasteSizeFunction( |
|
darin (slow to review)
2012/10/23 17:28:30
ditto: no need for base::allocator::
alexeif
2012/10/23 18:00:15
Done.
|
| + get_allocator_waste_size_function); |
| } |
| void SetGetStatsFunction(thunks::GetStatsFunction get_stats_function) { |