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

Unified Diff: base/memory/memory_coordinator_client.cc

Issue 2466773002: memory coordinator: Add trace macros to track state changes (Closed)
Patch Set: comment 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 | « base/memory/memory_coordinator_client.h ('k') | content/browser/memory/memory_coordinator_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/memory_coordinator_client.cc
diff --git a/base/memory/memory_coordinator_client.cc b/base/memory/memory_coordinator_client.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7fa62321771fd440639b15993ddd750acc2fed77
--- /dev/null
+++ b/base/memory/memory_coordinator_client.cc
@@ -0,0 +1,27 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/memory/memory_coordinator_client.h"
+
+#include "base/logging.h"
+
+namespace base {
+
+const char* MemoryStateToString(MemoryState state) {
+ switch (state) {
+ case MemoryState::UNKNOWN:
+ return "unknown";
+ case MemoryState::NORMAL:
+ return "normal";
+ case MemoryState::THROTTLED:
+ return "throttled";
+ case MemoryState::SUSPENDED:
+ return "suspended";
+ default:
+ NOTREACHED();
+ }
+ return "";
+}
+
+} // namespace base
« no previous file with comments | « base/memory/memory_coordinator_client.h ('k') | content/browser/memory/memory_coordinator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698