| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/browser/lifetime/keep_alive_types.h" | 5 #include "chrome/browser/lifetime/keep_alive_types.h" |
| 6 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 | 7 |
| 8 #ifndef NDEBUG | 8 #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) |
| 9 std::ostream& operator<<(std::ostream& out, const KeepAliveOrigin& origin) { | 9 std::ostream& operator<<(std::ostream& out, const KeepAliveOrigin& origin) { |
| 10 switch (origin) { | 10 switch (origin) { |
| 11 case KeepAliveOrigin::APP_CONTROLLER: | 11 case KeepAliveOrigin::APP_CONTROLLER: |
| 12 return out << "APP_CONTROLLER"; | 12 return out << "APP_CONTROLLER"; |
| 13 case KeepAliveOrigin::BROWSER: | 13 case KeepAliveOrigin::BROWSER: |
| 14 return out << "BROWSER"; | 14 return out << "BROWSER"; |
| 15 case KeepAliveOrigin::BROWSER_PROCESS_CHROMEOS: | 15 case KeepAliveOrigin::BROWSER_PROCESS_CHROMEOS: |
| 16 return out << "BROWSER_PROCESS_CHROMEOS"; | 16 return out << "BROWSER_PROCESS_CHROMEOS"; |
| 17 case KeepAliveOrigin::SESSION_RESTORE: | 17 case KeepAliveOrigin::SESSION_RESTORE: |
| 18 return out << "SESSION_RESTORE"; | 18 return out << "SESSION_RESTORE"; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 case KeepAliveRestartOption::DISABLED: | 52 case KeepAliveRestartOption::DISABLED: |
| 53 return out << "DISABLED"; | 53 return out << "DISABLED"; |
| 54 case KeepAliveRestartOption::ENABLED: | 54 case KeepAliveRestartOption::ENABLED: |
| 55 return out << "ENABLED"; | 55 return out << "ENABLED"; |
| 56 } | 56 } |
| 57 | 57 |
| 58 NOTREACHED(); | 58 NOTREACHED(); |
| 59 return out << static_cast<int>(restart); | 59 return out << static_cast<int>(restart); |
| 60 } | 60 } |
| 61 | 61 |
| 62 #endif // ndef NDEBUG | 62 #endif |
| OLD | NEW |