Revert "[M120 Migration]Fix for crash during chrome exit"
[platform/framework/web/chromium-efl.git] / ash / shutdown_reason.cc
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.
4
5 #include "ash/shutdown_reason.h"
6
7 #include <ostream>
8
9 #include "base/notreached.h"
10
11 namespace ash {
12
13 const char* ShutdownReasonToString(ShutdownReason reason) {
14   switch (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";
25   }
26   NOTREACHED() << "Invalid reason " << static_cast<int>(reason);
27   return "invalid";
28 }
29
30 }  // namespace ash