1 // Copyright 2016 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "base/memory/memory_coordinator_client.h" 6 7 #include "base/logging.h" 8 9 namespace base { 10 MemoryStateToString(MemoryState state)11const char* MemoryStateToString(MemoryState state) { 12 switch (state) { 13 case MemoryState::UNKNOWN: 14 return "unknown"; 15 case MemoryState::NORMAL: 16 return "normal"; 17 case MemoryState::THROTTLED: 18 return "throttled"; 19 case MemoryState::SUSPENDED: 20 return "suspended"; 21 default: 22 NOTREACHED(); 23 } 24 return ""; 25 } 26 27 } // namespace base 28