| Index: base/allocator/allocated_type_profiler_control.cc
|
| diff --git a/base/allocator/allocated_type_profiler_control.cc b/base/allocator/allocated_type_profiler_control.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ebc6d79952b85423f0997401ed8dd6d1d99c219a
|
| --- /dev/null
|
| +++ b/base/allocator/allocated_type_profiler_control.cc
|
| @@ -0,0 +1,29 @@
|
| +// Copyright 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "base/allocator/allocated_type_profiler_control.h"
|
| +
|
| +#if defined(PROFILING_ALLOCATED_TYPE)
|
| +static int g_enable_intercept = 1;
|
| +#endif
|
| +
|
| +namespace base {
|
| +namespace allocated_type_profiler {
|
| +
|
| +void StopProfilingAllocatedType() {
|
| +#if defined(PROFILING_ALLOCATED_TYPE)
|
| + g_enable_intercept = 0;
|
| +#endif
|
| +}
|
| +
|
| +bool IsProfilingAllocatedType() {
|
| +#if defined(PROFILING_ALLOCATED_TYPE)
|
| + return g_enable_intercept != 0;
|
| +#else
|
| + return false;
|
| +#endif
|
| +}
|
| +
|
| +} // namespace allocated_type_profiler
|
| +} // namespace base
|
|
|