Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Unified Diff: components/metrics/leak_detector/leak_detector.h

Issue 986503002: components/metrics: Add runtime memory leak detector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use namespace metrics::leak_detector; remove GYP flag (not needed for this CL) Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/metrics/leak_detector/leak_detector.h
diff --git a/components/metrics/leak_detector/leak_detector.h b/components/metrics/leak_detector/leak_detector.h
new file mode 100644
index 0000000000000000000000000000000000000000..7d88ea9d16cd9ab44accc2286af71d1b341fc73b
--- /dev/null
+++ b/components/metrics/leak_detector/leak_detector.h
@@ -0,0 +1,23 @@
+// Copyright 2015 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.
+
+#ifndef COMPONENTS_METRICS_LEAK_DETECTOR_LEAK_DETECTOR_H_
+#define COMPONENTS_METRICS_LEAK_DETECTOR_LEAK_DETECTOR_H_
+
+namespace metrics {
+namespace leak_detector {
+
+// The top level leak detector is a singleton instance. Implement it as a
+// namespace with init/shutdown functions rather than as a class with static
+// member functions.
+
+void Initialize();
+void Shutdown();
+
+bool IsInitialized();
+
+} // namespace leak_detector
+} // namespace metrics
+
+#endif // COMPONENTS_METRICS_LEAK_DETECTOR_LEAK_DETECTOR_H_
« no previous file with comments | « components/metrics/leak_detector/leak_analyzer_unittest.cc ('k') | components/metrics/leak_detector/leak_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698