OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_METRICS_METRICS_MEMORY_DETAILS_H_ | 5 #ifndef CHROME_BROWSER_METRICS_METRICS_MEMORY_DETAILS_H_ |
6 #define CHROME_BROWSER_METRICS_METRICS_MEMORY_DETAILS_H_ | 6 #define CHROME_BROWSER_METRICS_METRICS_MEMORY_DETAILS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" |
| 12 #include "build/build_config.h" |
11 #include "chrome/browser/memory_details.h" | 13 #include "chrome/browser/memory_details.h" |
12 | 14 |
13 // MemoryGrowthTracker tracks latest metrics about record time and memory usage | 15 // MemoryGrowthTracker tracks latest metrics about record time and memory usage |
14 // at that time per process. | 16 // at that time per process. |
15 class MemoryGrowthTracker { | 17 class MemoryGrowthTracker { |
16 public: | 18 public: |
17 MemoryGrowthTracker(); | 19 MemoryGrowthTracker(); |
18 ~MemoryGrowthTracker(); | 20 ~MemoryGrowthTracker(); |
19 | 21 |
20 // If 30 minutes have passed since last UMA record, UpdateSample() computes | 22 // If 30 minutes have passed since last UMA record, UpdateSample() computes |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 64 |
63 // A pointer to MemoryGrowthTracker which is contained in a longer-lived | 65 // A pointer to MemoryGrowthTracker which is contained in a longer-lived |
64 // owner of MetricsMemoryDetails, for example, ChromeMetricsServiceClient. | 66 // owner of MetricsMemoryDetails, for example, ChromeMetricsServiceClient. |
65 // If it is null, nothing is tracked. | 67 // If it is null, nothing is tracked. |
66 MemoryGrowthTracker* memory_growth_tracker_; | 68 MemoryGrowthTracker* memory_growth_tracker_; |
67 | 69 |
68 DISALLOW_COPY_AND_ASSIGN(MetricsMemoryDetails); | 70 DISALLOW_COPY_AND_ASSIGN(MetricsMemoryDetails); |
69 }; | 71 }; |
70 | 72 |
71 #endif // CHROME_BROWSER_METRICS_METRICS_MEMORY_DETAILS_H_ | 73 #endif // CHROME_BROWSER_METRICS_METRICS_MEMORY_DETAILS_H_ |
OLD | NEW |