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

Unified Diff: base/memory/memory_coordinator_client.h

Issue 2482783002: Add StateOn{Moderate,Critical}NotificationReceived metrics (Closed)
Patch Set: Remove std::move() Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/memory_coordinator_client.h
diff --git a/base/memory/memory_coordinator_client.h b/base/memory/memory_coordinator_client.h
index 7d4681eed0ab270bfc8b9f8b98139bb28ae9db84..148f4c175345cd78af72506283ff76f04478231d 100644
--- a/base/memory/memory_coordinator_client.h
+++ b/base/memory/memory_coordinator_client.h
@@ -22,7 +22,9 @@ namespace base {
// MemoryState is an indicator that processes can use to guide their memory
// allocation policies. For example, a process that receives the suspended
// state can use that as as signal to drop memory caches.
-enum class MemoryState {
+// NOTE: This enum is used to back an UMA histogram, and therefore should be
+// treated as append-only.
+enum class MemoryState : int {
// The state is unknown.
UNKNOWN = -1,
// No memory constraints.
@@ -38,6 +40,8 @@ enum class MemoryState {
SUSPENDED = 2,
};
+const int kMemoryStateMax = static_cast<int>(MemoryState::SUSPENDED) + 1;
+
// Returns a string representation of MemoryState.
BASE_EXPORT const char* MemoryStateToString(MemoryState state);
« no previous file with comments | « no previous file | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698