| OLD | NEW |
| (Empty) |
| 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 "components/arc/arc_session_observer.h" | |
| 6 | |
| 7 namespace arc { | |
| 8 | |
| 9 std::ostream& operator<<(std::ostream& os, | |
| 10 ArcSessionObserver::StopReason reason) { | |
| 11 switch (reason) { | |
| 12 #define CASE_IMPL(val) \ | |
| 13 case ArcSessionObserver::StopReason::val: \ | |
| 14 return os << #val | |
| 15 | |
| 16 CASE_IMPL(SHUTDOWN); | |
| 17 CASE_IMPL(GENERIC_BOOT_FAILURE); | |
| 18 CASE_IMPL(LOW_DISK_SPACE); | |
| 19 CASE_IMPL(CRASH); | |
| 20 #undef CASE_IMPL | |
| 21 } | |
| 22 | |
| 23 // In case of unexpected value, output the int value. | |
| 24 return os << "StopReason(" << static_cast<int>(reason) << ")"; | |
| 25 } | |
| 26 | |
| 27 } // namespace arc | |
| OLD | NEW |