Remove PlatformFile from profile_browsertest
[chromium-blink-merge.git] / content / shell / renderer / leak_detector.h
blobe9935c21cb3d1dbb17ad47fe6163c946a08223e7
1 // Copyright 2014 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.
5 #ifndef CONTENT_SHELL_RENDERER_LEAK_DETECTOR_H_
6 #define CONTENT_SHELL_RENDERER_LEAK_DETECTOR_H_
8 #include "base/basictypes.h"
9 #include "content/shell/common/leak_detection_result.h"
11 namespace blink {
12 class WebFrame;
15 namespace content {
17 // LeakDetector counts DOM objects and compare them between two pages.
18 class LeakDetector {
19 public:
20 LeakDetector();
22 // Counts DOM objects, compare the previous status and returns the result of
23 // leak detection. It is assumed that this method is always called when a
24 // specific page, like about:blank is loaded to compare the previous
25 // circumstance of DOM objects. If the number of objects increses, there
26 // should be a leak.
27 LeakDetectionResult TryLeakDetection(blink::WebFrame* frame);
29 private:
30 // The number of the live documents last time.
31 unsigned previous_number_of_live_documents_;
33 // The number of the live nodes last time.
34 unsigned previous_number_of_live_nodes_;
36 DISALLOW_COPY_AND_ASSIGN(LeakDetector);
39 } // namespace content
41 #endif // CONTENT_SHELL_RENDERER_LEAK_DETECTOR_H_