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 #ifndef NDEBUG |
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: |
| 12 return out << "APP_CONTROLLER"; |
| 13 case KeepAliveOrigin::BROWSER_PROCESS_CHROMEOS: |
| 14 return out << "BROWSER_PROCESS_CHROMEOS"; |
11 case KeepAliveOrigin::BACKGROUND_MODE_MANAGER: | 15 case KeepAliveOrigin::BACKGROUND_MODE_MANAGER: |
12 return out << "BACKGROUND_MODE_MANAGER"; | 16 return out << "BACKGROUND_MODE_MANAGER"; |
13 case KeepAliveOrigin::BACKGROUND_MODE_MANAGER_STARTUP: | 17 case KeepAliveOrigin::BACKGROUND_MODE_MANAGER_STARTUP: |
14 return out << "BACKGROUND_MODE_MANAGER_STARTUP"; | 18 return out << "BACKGROUND_MODE_MANAGER_STARTUP"; |
| 19 case KeepAliveOrigin::LOGIN_DISPLAY_HOST_IMPL: |
| 20 return out << "LOGIN_DISPLAY_HOST_IMPL"; |
15 case KeepAliveOrigin::APP_LIST_SERVICE_VIEWS: | 21 case KeepAliveOrigin::APP_LIST_SERVICE_VIEWS: |
16 return out << "APP_LIST_SERVICE_VIEWS"; | 22 return out << "APP_LIST_SERVICE_VIEWS"; |
17 case KeepAliveOrigin::APP_LIST_SHOWER: | 23 case KeepAliveOrigin::APP_LIST_SHOWER: |
18 return out << "APP_LIST_SHOWER"; | 24 return out << "APP_LIST_SHOWER"; |
19 case KeepAliveOrigin::CHROME_APP_DELEGATE: | 25 case KeepAliveOrigin::CHROME_APP_DELEGATE: |
20 return out << "CHROME_APP_DELEGATE"; | 26 return out << "CHROME_APP_DELEGATE"; |
| 27 case KeepAliveOrigin::PANEL: |
| 28 return out << "PANEL"; |
21 case KeepAliveOrigin::PANEL_VIEW: | 29 case KeepAliveOrigin::PANEL_VIEW: |
22 return out << "PANEL_VIEW"; | 30 return out << "PANEL_VIEW"; |
23 case KeepAliveOrigin::PROFILE_LOADER: | 31 case KeepAliveOrigin::PROFILE_LOADER: |
24 return out << "PROFILE_LOADER"; | 32 return out << "PROFILE_LOADER"; |
25 case KeepAliveOrigin::USER_MANAGER_VIEW: | 33 case KeepAliveOrigin::USER_MANAGER_VIEW: |
26 return out << "USER_MANAGER_VIEW"; | 34 return out << "USER_MANAGER_VIEW"; |
27 } | 35 } |
28 | 36 |
29 NOTREACHED(); | 37 NOTREACHED(); |
30 return out << static_cast<int>(origin); | 38 return out << static_cast<int>(origin); |
31 } | 39 } |
32 | 40 |
33 std::ostream& operator<<(std::ostream& out, | 41 std::ostream& operator<<(std::ostream& out, |
34 const KeepAliveRestartOption& restart) { | 42 const KeepAliveRestartOption& restart) { |
35 switch (restart) { | 43 switch (restart) { |
36 case KeepAliveRestartOption::DISABLED: | 44 case KeepAliveRestartOption::DISABLED: |
37 return out << "DISABLED"; | 45 return out << "DISABLED"; |
38 case KeepAliveRestartOption::ENABLED: | 46 case KeepAliveRestartOption::ENABLED: |
39 return out << "ENABLED"; | 47 return out << "ENABLED"; |
40 } | 48 } |
41 | 49 |
42 NOTREACHED(); | 50 NOTREACHED(); |
43 return out << static_cast<int>(restart); | 51 return out << static_cast<int>(restart); |
44 } | 52 } |
45 | 53 |
46 #endif // ndef NDEBUG | 54 #endif // ndef NDEBUG |
OLD | NEW |