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

Side by Side Diff: components/memory_pressure/memory_pressure_stats_collector.cc

Issue 1548113002: Switch to standard integer types in components/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 4 years, 11 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 #include "components/memory_pressure/memory_pressure_stats_collector.h" 5 #include "components/memory_pressure/memory_pressure_stats_collector.h"
6 6
7 #include <stddef.h>
8 #include <stdint.h>
9
10 #include "base/macros.h"
7 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
8 #include "base/time/tick_clock.h" 12 #include "base/time/tick_clock.h"
9 13
10 namespace memory_pressure { 14 namespace memory_pressure {
11 15
12 namespace { 16 namespace {
13 17
14 using MemoryPressureLevel = MemoryPressureListener::MemoryPressureLevel; 18 using MemoryPressureLevel = MemoryPressureListener::MemoryPressureLevel;
15 19
16 // Converts a memory pressure level to an UMA enumeration value. 20 // Converts a memory pressure level to an UMA enumeration value.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 void MemoryPressureStatsCollector::ReportLevelChange( 149 void MemoryPressureStatsCollector::ReportLevelChange(
146 MemoryPressureLevel old_pressure_level, 150 MemoryPressureLevel old_pressure_level,
147 MemoryPressureLevel new_pressure_level) { 151 MemoryPressureLevel new_pressure_level) {
148 UMA_HISTOGRAM_ENUMERATION("Memory.PressureLevelChange", 152 UMA_HISTOGRAM_ENUMERATION("Memory.PressureLevelChange",
149 MemoryPressureLevelChangeToUmaEnumValue( 153 MemoryPressureLevelChangeToUmaEnumValue(
150 old_pressure_level, new_pressure_level), 154 old_pressure_level, new_pressure_level),
151 UMA_MEMORY_PRESSURE_LEVEL_CHANGE_COUNT); 155 UMA_MEMORY_PRESSURE_LEVEL_CHANGE_COUNT);
152 } 156 }
153 157
154 } // namespace memory_pressure 158 } // namespace memory_pressure
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698