OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 #include "components/metrics/leak_detector/leak_detector.h" |
| 6 |
| 7 #include <algorithm> |
| 8 |
| 9 namespace metrics { |
| 10 |
| 11 LeakDetector::LeakReport::LeakReport() {} |
| 12 |
| 13 LeakDetector::LeakReport::~LeakReport() {} |
| 14 |
| 15 LeakDetector::LeakDetector(float sampling_rate, |
| 16 int max_stack_depth, |
| 17 uint64_t analysis_interval_bytes, |
| 18 int size_suspicion_threshold, |
| 19 int call_stack_suspicion_threshold) {} |
| 20 |
| 21 LeakDetector::LeakDetector() : LeakDetector(1.0f, 4, 32 * 1024 * 1024, 4, 4) {} |
| 22 |
| 23 LeakDetector::~LeakDetector() {} |
| 24 |
| 25 void LeakDetector::AddObserver(Observer* observer) { |
| 26 observers_.AddObserver(observer); |
| 27 } |
| 28 |
| 29 void LeakDetector::RemoveObserver(Observer* observer) { |
| 30 observers_.RemoveObserver(observer); |
| 31 } |
| 32 |
| 33 void LeakDetector::NotifyObservers(const std::vector<LeakReport>& reports) { |
| 34 for (const LeakReport& report : reports) { |
| 35 FOR_EACH_OBSERVER(Observer, observers_, OnLeakFound(report)); |
| 36 } |
| 37 } |
| 38 |
| 39 } // namespace metrics |
OLD | NEW |