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

Side by Side Diff: components/metrics/system_memory_stats_recorder.h

Issue 1366643002: Extract guts of ChromeStabilityMetricsProvider into helper class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 unified diff | Download patch
OLDNEW
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_MEMORY_SYSTEM_MEMORY_STATS_RECORDER_H_ 5 #ifndef COMPONENTS_METRICS_SYSTEM_MEMORY_STATS_RECORDER_H_
6 #define CHROME_BROWSER_MEMORY_SYSTEM_MEMORY_STATS_RECORDER_H_ 6 #define COMPONENTS_METRICS_SYSTEM_MEMORY_STATS_RECORDER_H_
7 7
8 namespace memory { 8 namespace metrics {
9 9
10 // Record a memory size in megabytes, over a potential interval up to 32 GB. 10 // Record a memory size in megabytes, over a potential interval up to 32 GB.
11 #define UMA_HISTOGRAM_LARGE_MEMORY_MB(name, sample) \ 11 #define UMA_HISTOGRAM_LARGE_MEMORY_MB(name, sample) \
12 UMA_HISTOGRAM_CUSTOM_COUNTS(name, sample, 1, 32768, 50) 12 UMA_HISTOGRAM_CUSTOM_COUNTS(name, sample, 1, 32768, 50)
13 13
14 // The type of memory UMA stats to be recorded in RecordMemoryStats. 14 // The type of memory UMA stats to be recorded in RecordMemoryStats.
15 enum RecordMemoryStatsType { 15 enum RecordMemoryStatsType {
16 // When a tab was discarded. 16 // When a tab was discarded.
17 RECORD_MEMORY_STATS_TAB_DISCARDED, 17 RECORD_MEMORY_STATS_TAB_DISCARDED,
18 18
19 // Right after the renderer for contents was killed. 19 // Right after the renderer for contents was killed.
20 RECORD_MEMORY_STATS_CONTENTS_OOM_KILLED, 20 RECORD_MEMORY_STATS_CONTENTS_OOM_KILLED,
21 21
22 // Right after the renderer for extensions was killed. 22 // Right after the renderer for extensions was killed.
23 RECORD_MEMORY_STATS_EXTENSIONS_OOM_KILLED, 23 RECORD_MEMORY_STATS_EXTENSIONS_OOM_KILLED,
24 }; 24 };
25 25
26 void RecordMemoryStats(RecordMemoryStatsType type); 26 void RecordMemoryStats(RecordMemoryStatsType type);
27 27
28 } // namespace memory 28 } // namespace metrics
29 29
30 #endif // CHROME_BROWSER_MEMORY_SYSTEM_MEMORY_STATS_RECORDER_H_ 30 #endif // COMPONENTS_METRICS_SYSTEM_MEMORY_STATS_RECORDER_H_
OLDNEW
« no previous file with comments | « components/metrics/stability_metrics_helper_unittest.cc ('k') | components/metrics/system_memory_stats_recorder_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698