1 // Copyright 2018 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ash/shutdown_reason.h"
9 #include "base/notreached.h"
13 const char* ShutdownReasonToString(ShutdownReason reason) {
15 case ShutdownReason::POWER_BUTTON:
16 return "power button";
17 case ShutdownReason::LOGIN_SHUT_DOWN_BUTTON:
18 return "login shut down button";
19 case ShutdownReason::TRAY_SHUT_DOWN_BUTTON:
20 return "tray shut down button";
21 case ShutdownReason::ARC_POWER_BUTTON:
22 return "arc power button";
23 case ShutdownReason::DEBUG_ACCELERATOR:
24 return "debug accelerator";
26 NOTREACHED() << "Invalid reason " << static_cast<int>(reason);