| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/arc/arc_session_observer.h" | 5 #include "components/arc/arc_stop_reason.h" |
| 6 | 6 |
| 7 namespace arc { | 7 namespace arc { |
| 8 | 8 |
| 9 std::ostream& operator<<(std::ostream& os, | 9 std::ostream& operator<<(std::ostream& os, ArcStopReason reason) { |
| 10 ArcSessionObserver::StopReason reason) { | |
| 11 switch (reason) { | 10 switch (reason) { |
| 12 #define CASE_IMPL(val) \ | 11 #define CASE_IMPL(val) \ |
| 13 case ArcSessionObserver::StopReason::val: \ | 12 case ArcStopReason::val: \ |
| 14 return os << #val | 13 return os << #val |
| 15 | 14 |
| 16 CASE_IMPL(SHUTDOWN); | 15 CASE_IMPL(SHUTDOWN); |
| 17 CASE_IMPL(GENERIC_BOOT_FAILURE); | 16 CASE_IMPL(GENERIC_BOOT_FAILURE); |
| 18 CASE_IMPL(LOW_DISK_SPACE); | 17 CASE_IMPL(LOW_DISK_SPACE); |
| 19 CASE_IMPL(CRASH); | 18 CASE_IMPL(CRASH); |
| 20 #undef CASE_IMPL | 19 #undef CASE_IMPL |
| 21 } | 20 } |
| 22 | 21 |
| 23 // In case of unexpected value, output the int value. | 22 // In case of unexpected value, output the int value. |
| 24 return os << "StopReason(" << static_cast<int>(reason) << ")"; | 23 return os << "ArcStopReason(" << static_cast<int>(reason) << ")"; |
| 25 } | 24 } |
| 26 | 25 |
| 27 } // namespace arc | 26 } // namespace arc |
| OLD | NEW |