Index: components/metrics/leak_detector/leak_detector.cc |
diff --git a/components/metrics/leak_detector/leak_detector.cc b/components/metrics/leak_detector/leak_detector.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..89dc3d945c3cc873494afdd8cc59c2a02fefb1d8 |
--- /dev/null |
+++ b/components/metrics/leak_detector/leak_detector.cc |
@@ -0,0 +1,39 @@ |
+// Copyright 2016 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 "components/metrics/leak_detector/leak_detector.h" |
+ |
+#include <algorithm> |
+ |
+namespace metrics { |
+ |
+LeakDetector::LeakReport::LeakReport() {} |
+ |
+LeakDetector::LeakReport::~LeakReport() {} |
+ |
+LeakDetector::LeakDetector(float sampling_rate, |
+ int max_stack_depth, |
+ uint64_t analysis_interval_bytes, |
+ int size_suspicion_threshold, |
+ int call_stack_suspicion_threshold) {} |
+ |
+LeakDetector::LeakDetector() : LeakDetector(1.0f, 4, 32 * 1024 * 1024, 4, 4) {} |
+ |
+LeakDetector::~LeakDetector() {} |
+ |
+void LeakDetector::AddObserver(Observer* observer) { |
+ observers_.AddObserver(observer); |
+} |
+ |
+void LeakDetector::RemoveObserver(Observer* observer) { |
+ observers_.RemoveObserver(observer); |
+} |
+ |
+void LeakDetector::NotifyObservers(const std::vector<LeakReport>& reports) { |
+ for (const LeakReport& report : reports) { |
+ FOR_EACH_OBSERVER(Observer, observers_, OnLeakFound(report)); |
+ } |
+} |
+ |
+} // namespace metrics |