type_profiler_control.h 842 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef BASE_ALLOCATOR_TYPE_PROFILER_CONTROL_H_
  5. #define BASE_ALLOCATOR_TYPE_PROFILER_CONTROL_H_
  6. #include "base/gtest_prod_util.h"
  7. namespace base {
  8. namespace type_profiler {
  9. class Controller {
  10. public:
  11. static void Stop();
  12. static bool IsProfiling();
  13. private:
  14. FRIEND_TEST_ALL_PREFIXES(TypeProfilerTest,
  15. TestProfileNewWithoutProfiledDelete);
  16. // It must be used only from allowed unit tests. The following is only
  17. // allowed for use in unit tests. Profiling should never be restarted in
  18. // regular use.
  19. static void Restart();
  20. };
  21. } // namespace type_profiler
  22. } // namespace base
  23. #endif // BASE_ALLOCATOR_TYPE_PROFILER_CONTROL_H_