blob: 17cf5b65e4a44e8453c84aea755a6e10ac146b65 [file] [log] [blame]
Daniel Eratb8cf9492015-07-06 13:18:13 -06001// 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
5#ifndef BASE_ALLOCATOR_TYPE_PROFILER_CONTROL_H_
6#define BASE_ALLOCATOR_TYPE_PROFILER_CONTROL_H_
7
8#include "base/gtest_prod_util.h"
9
10namespace base {
11namespace type_profiler {
12
13class Controller {
14 public:
15 static void Stop();
16 static bool IsProfiling();
17
18 private:
19 FRIEND_TEST_ALL_PREFIXES(TypeProfilerTest,
20 TestProfileNewWithoutProfiledDelete);
21
22 // It must be used only from allowed unit tests. The following is only
23 // allowed for use in unit tests. Profiling should never be restarted in
24 // regular use.
25 static void Restart();
26};
27
28} // namespace type_profiler
29} // namespace base
30
31#endif // BASE_ALLOCATOR_TYPE_PROFILER_CONTROL_H_